View Single Post
 
Old 10-10-2018, 04:59 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,103
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Maybe something like


Code:
Sub Macro1()
Dim oCell As Cell
Dim oShape As InlineShape
    With ActiveDocument.Styles("Caption").Font
        .Name = "Arial"
        .Size = 9
        .Color = wdColorAutomatic
    End With

    For Each oCell In Selection.Tables(1).Range.Cells
        If oCell.Range.InlineShapes.Count = 1 Then
            Set oShape = oCell.Range.InlineShapes(1)
            oShape.Range.InsertCaption _
                    Label:="Figure", _
                    TitleAutoText:="InsertCaption1", _
                    Title:="", _
                    Position:=wdCaptionPositionBelow, _
                    ExcludeLabel:=0
        End If
        DoEvents
    Next oCell
lbl_Exit:
    Set oShape = Nothing
    Set oCell = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote