AutoCaption.AutoInsert property (Word)

True if a caption is automatically added when the item is inserted into a document. Read/write Boolean.

Syntax

expression. AutoInsert

expression A variable that represents an 'AutoCaption' object.

Example

This example enables Word to add captions to tables automatically. Then the example collapses the selection to an insertion point, and inserts a table. A caption is automatically added to the new table.

AutoCaptions("Microsoft Word Table").AutoInsert = True 
Selection.Collapse Direction:=wdCollapseStart 
ActiveDocument.Tables.Add Range:=Selection.Range, _ 
 NumRows:=2, NumColumns:=2

See also

AutoCaption Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.