Here I am again.
Since I have a new PC and Laptop, the Macro gives an Error.
Can you give me some advice?
PC = Win 10 Pro
Laptop = Win 365
Piece of the code below. It gives an error on this part.
.Characters.First.InsertCaption _
Label:="Foto", Title:=StrTxt, _
Position:=wdCaptionPositionBelow, ExcludeLabel:=False
Code:
'Insert the Caption on the row below the picture
With oTbl.Cell(r + 1, c).Range
.InsertBefore vbCr
.Characters.First.InsertCaption _
Label:="Foto", Title:=StrTxt, _
Position:=wdCaptionPositionBelow, ExcludeLabel:=False
.Characters.First = vbNullString
.Characters.Last.Previous = vbNullString
End With
'Exit when we're done
If j = .SelectedItems.Count Then Exit For
Next
'Add extra rows as needed