0

So I've just got a big admin job from a client, where they have 1000 images that they want putting into a Word document.

I will receive the images grouped in folders according to type, so the idea is that I'd add subheadings for each group of photos then add tables under each subheading, which will contain the photos and the photo number. There will be 6 images per page, each occupying a cell in a table, with each cell in the table numbered from 1-1000.

I was wondering if there's a way to partly automate this process, so I don't have to manually create tables, add the images, resize and number each one.

Does anyone have a solution?

0

You could try writing a macro(s) in VBA

You need to turn on the developer option under Options.

  ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=5, NumColumns:= _
        6, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
        wdAutoFitFixed
    With Selection.Tables(1)
        If .Style <> "Table Grid" Then
            .Style = "Table Grid"
        End If
        .ApplyStyleHeadingRows = True
        .ApplyStyleLastRow = False
        .ApplyStyleFirstColumn = True
        .ApplyStyleLastColumn = False
        .ApplyStyleRowBands = True
        .ApplyStyleColumnBands = False
    End With

So here you can see you can modify the first line to make a table have any number of rows and columns.

More complex tables require more code. You can populate the table programmatically if you spend the time to write and troubleshoot the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.