View Single Post
 
Old 03-07-2022, 07:31 PM
mathemagician44 mathemagician44 is offline Windows 11 Office 2019
Novice
 
Join Date: Jan 2022
Posts: 7
mathemagician44 is on a distinguished road
Default

Freaking excellent!! Thank you so much!

While I have your attention, can you tell me how to apply a certain font name, type, color to
Code:
'Get the Image name for the Caption
        StrTxt = Split(.SelectedItems(j), "\")(UBound(Split(.SelectedItems(j), "\")))
        
        StrTxt = Left(StrTxt, InStrRev(StrTxt, ".") - 1)
        StrTxt = Right(StrTxt, Len(StrTxt) - Len(Split(StrTxt, " ")(0)) - 1)
        
        'Insert the Caption on the row below the picture
        With oTbl.Cell(r + 1, c).Range
        .InsertBefore vbCr
        .Characters.First.InsertCaption _
        Label:="Photograph", Title:=StrTxt, _
        Position:=wdCaptionPositionBelow, ExcludeLabel:=False
        .Characters.First = vbNullString
        .Characters.Last.Previous = vbNullString
        End With
Reply With Quote