![]() |
#6
|
||||
|
||||
![]()
Change:
Code:
'Get the Image name for the Caption StrTxt = Split(.SelectedItems(j), "\")(UBound(Split(.SelectedItems(j), "\"))) StrTxt = ": " & Split(StrTxt, ".")(0) '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 Code:
'Get the Image name for the Caption StrTxt = Split(Split(.SelectedItems(j), "\")(UBound(Split(.SelectedItems(j), "\"))), ".")(0) 'Insert the Caption on the row below the picture oTbl.Cell(r + 1, c).Range.Text = StrTxt
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Denise | Word VBA | 3 | 03-20-2022 02:39 PM |
![]() |
Catluvr | Word VBA | 2 | 12-01-2021 12:14 PM |
Inserting images for printing | EdGood | Drawing and Graphics | 2 | 01-16-2019 09:12 PM |
![]() |
kissingfrogs2003 | Word VBA | 3 | 08-30-2016 11:42 AM |
![]() |
sulasno | Drawing and Graphics | 4 | 04-09-2011 07:28 AM |