I want to create a procedure in a Word 2002 template which adds a
caption below any graphic inserted via the Insert|Picture|From
File...command
At the moment I have the following procedure to do just this but for
Word tables:
AutoCaptions.CancelAutoInsert
With AutoCaptions("wfwTable")
.AutoInsert = True
.CaptionLabel = CaptionLabels("Table")
End With
CaptionLabels("Table").Position = wdCaptionPositionAbove
With CaptionLabels("Table")
.NumberStyle = wdCaptionNumberStyleArabic
.IncludeChapterNumber = False
End With
What I cannot fathom out is the string which should go where I've got
"wfwTable" above. I know I will have to replace "Table" with "Figure"
and change its position.
Can anyone suggest the correct string, please?
As an aside, I tried to do this manually using the
Insert|Caption|AutoCaption, selected what I thought was the right one
(Bitmap Picture) and then used the Insert|Picture|From File command
and nothing happened. The command refused to work from there on. I
couldn't even reset the selection. Had to create a new Normal.dot!
Stefan Blom - 12 Feb 2008 11:09 GMT
To specify a specific AutoCaption object, use a name listed in the
AutoCaption dialog box. For example, AutoCaptions("Microsoft Equation 3.0")
specifies an equation object.
What is not listed in the dialog box cannot be auto-captioned, as far as I
know.

Signature
Stefan Blom
Microsoft Word MVP
>I want to create a procedure in a Word 2002 template which adds a
> caption below any graphic inserted via the Insert|Picture|From
[quoted text clipped - 24 lines]
> and nothing happened. The command refused to work from there on. I
> couldn't even reset the selection. Had to create a new Normal.dot!