AutoInsert Property

Microsoft Word Visual Basic

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

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