Consulting

Results 1 to 20 of 20

Thread: Create Table for Multiple Pictures

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Dec 2019
    Posts
    10
    Location

    Create Table for Multiple Pictures

    Hello, I've seen the code in http://www.vbaexpress.com/forum/show...nto-Word-Table and It's very similar to what I need but since I'm very new to VBA I'm asking for your assistance.
    Here's what i'm trying to achieve.
    I need to insert imagens in a table like the code presented here, but I don't need the captions, thats easy and I've solved this problem.
    My goal is, a table with 3 columns and 3 rows.
    The first one with 8.43cm with second 0.3 and third 8.43, the bigger ones will be the places for images. The height will be 11.1 on the first row and 0.7 on the second and third. I've tried with a variation of this code
    Sub FormatRows(oTbl As Table, x As Long, Hght As Single)
        With oTbl
            With .Rows(x)
                .Height = InchesToPoints(Hght)
                .HeightRule = wdRowHeightExactly
                .Range.Style = "Normal"
            End With
            With .Rows(x + 1)
                .Height = CentimetersToPoints(0.5)
                .HeightRule = wdRowHeightExactly
                .Range.Style = "Caption"
            End With
        End With
    End Sub
    But I was unsuccessfull.

    The second thing is, on the very first cell of each page I want to add a repeating text (like a title) instead of a picture (with an input box). Is this possible to do?

    Cheers
    Tiago
    Last edited by macropod; 12-10-2019 at 01:54 PM. Reason: Split from original thread, added link, & repaired code structure

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •