Do all the required pages & tables (assuming that's what your 'areas' are) already exist, or is the code supposed to add them as it goes? Does each table (again, assuming that's what your 'areas' are) have two rows - one for the picture and one for the caption? Assuming the answers to both questions are yes, the following macro could be used:
Sub AddPicsFromFolders()
Application.ScreenUpdating = False
Dim ArrFldr(), ArrHght(), oTbl As Table, i As Long, j As Long
Dim strFolder As String, strFile As String
ArrFldr() = Array("Folder1", "Folder2", "Folder3")
ArrHght() = Array(2, 3, 3)
CaptionLabels.Add Name:="Picture"
For i = 0 To UBound(ArrFldr())
strFolder = "C:\Users\" & Environ("Username") & "\Pictures\" & ArrFldr(i) & "\"
strFile = Dir(strFolder & "*.jpg", vbNormal)
j = 0
While strFile <> ""
j = j + 1
Set oTbl = ActiveDocument.Tables(j * (UBound(ArrFldr()) + 1) - UBound(ArrFldr()) + i)
With oTbl
.AllowAutoFit = False
'Format the rows
Call FormatRows(oTbl, CSng(ArrHght(i)))
'Insert & size the Picture
.Range.InlineShapes.AddPicture FileName:=strFolder & strFile, LinkToFile:=False, _
SaveWithDocument:=True, Range:=.Cell(1, 1).Range
With .Range.InlineShapes(1)
.LockAspectRatio = True
.Height = InchesToPoints(CSng(ArrHght(i)))
End With
'Insert the Caption on the row below the picture
With .Cell(.Rows.Count, 1).Range
.InsertBefore vbCr
.Characters.First.InsertCaption Label:="Picture", _
Title:=Split(strFile, ".")(0), _
Position:=wdCaptionPositionBelow, ExcludeLabel:=False
.Characters.First = vbNullString
.Characters.Last.Previous = vbNullString
End With
End With
If j Mod 10 = 0 Then DoEvents
strFile = Dir()
Wend
Next
Application.ScreenUpdating = True
End Sub
'
Sub FormatRows(oTbl As Table, Hght As Single)
With oTbl
With .Rows(1)
.Height = InchesToPoints(Hght)
.HeightRule = wdRowHeightExactly
.Range.Style = "Normal"
End With
With .Rows(2)
.Height = InchesToPoints(0.25)
.HeightRule = wdRowHeightExactly
.Range.Style = "Caption"
End With
End With
End Sub
As coded, the macro :
• assumes the pictures to be inserted are in folders named Folder1, Folder2, & Folder3, respectively, in your Pictures folder. Change the filepaths to suit.
• doesn't require you to have the table row-height pre-set; it does that for itself using the heights (in inches) specified in 'ArrHght() = Array(2, 3, 3)', which presently applies 2, 3, & 3 inch heights, respectively.
• uses the "Normal" and "Caption" Styles for the image and caption rows, respectively. These both left-align the content, but you can change that and/or which Styles get used. Whichever Style you use for the image row, it should have 0 space before & after; otherwise the image won't fit properly.
If you'd rather the macro did no table formatting, you could comment-out 'Call FormatRows(oTbl, CSng(ArrHght(i)))'