Class AutoCaptions (Word VBA)
A collection of AutoCaption objects that represent the captions that can be automatically added when items such as tables, pictures, or OLE objects are inserted into a document. To use a AutoCaptions class variable it first needs to be instantiated, for example
Dim acs as AutoCaptions
Set acs = AutoCaptions
For Each
Here is an example of processing the AutoCaptions items in a collection.
Dim acn As AutoCaption
For Each acn In AutoCaptions
Next acn
CancelAutoInsert
Prevents Word from automatically adding captions to any type of item.
AutoCaptions.CancelAutoInsert
Count
Returns the number of items in the AutoCaptions collection.
Dim lngCount As Long
lngCount = AutoCaptions.Count
Item
Returns an individual AutoCaption object in a collection.
Item (Index)
Index: The individual object to be returned. Can be a Long indicating the ordinal position or a String representing the name of the individual object.
Dim acn As AutoCaption
Set acn = AutoCaptions(Index:=1)