View Single Post
 
Old 08-30-2022, 09:28 AM
rollis13's Avatar
rollis13 rollis13 is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Jan 2021
Location: Cordenons
Posts: 143
rollis13 will become famous soon enough
Default

Follow what suggested in post #10 of the thread you linked.
That means you could apply these changes to this part of the macro:
Code:
'...
'Get the Image name for the Caption
StrTxt = Split(.SelectedItems(j), "\")(UBound(Split(.SelectedItems(j), "\")))
StrTxt = "Image " & Split(StrTxt, ".")(0) '<- changed
oTbl.Cell(r + 1, c).Range.Text = StrTxt '<- added
'-------------- do not use ----------------------------------------
'Insert the Caption on the row below the picture
'With oTbl.Cell(r + 1, c).Range
'    .InsertBefore vbCr
'.Characters.First.InsertCaption Label:="Picture", Title:=StrTxt, _
'           Position:=wdCaptionPositionBelow, ExcludeLabel:=False
'    .Characters.First = vbNullString
'    .Characters.Last.Previous = vbNullString
'End With
'------------------------------------------------------------------
'Exit when we're done
'...
Reply With Quote