![]() |
|
#15
|
||||
|
||||
|
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 |
| Tags |
| automatic figure caption |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
VBA to insert captions without appending to existing captions
|
Marrick13 | Word VBA | 17 | 03-21-2023 07:51 PM |
Help formatting Pictures inside a Text Box in Word 2013
|
jstumbo87 | Word | 2 | 01-29-2014 12:07 PM |
Macro to read word document
|
harishankar.selvaraju | Excel Programming | 1 | 06-14-2012 03:48 AM |
| Where we can find a Word document (docx file) that contains professional work inside? | Jamal NUMAN | Word | 0 | 06-26-2011 09:57 AM |
| Captions and Figures Inside a Frame...RIDICULOUS MS hasn't developed a solution!!! | stlsmiln | Word | 2 | 02-23-2010 02:15 AM |