Syntax
InsertAutoCaption [.Clear] [, .ClearAll] [, .Object = text] [, .Label = text] [, .Position = number]
Remarks
Specifies a caption to insert automatically whenever an object of the specified type is inserted. The arguments for the InsertAutoCaption statement correspond to the options in the AutoCaption dialog box (Caption command, Insert menu).
Argument | Explanation |
.Clear | Cancels adding captions automatically for the type of object specified by .Object. |
.ClearAll | Cancels adding captions automatically for all types of objects. |
.Object | The name of the object type for which you want to establish an automatic caption, as it appears in the Add Caption When Inserting box. |
.Label | The caption label to insert automatically. If the label has not yet been defined, the instruction has no effect. Use InsertAddCaption to define new labels. |
.Position | The position of the caption: 0 (zero) Above Item 1 Below Item |
Example
This example creates a new caption label, "Picture," and specifies that whenever a Microsoft Word Picture object is inserted, this label is automatically inserted:
InsertAddCaption .Name = "Picture" InsertAutoCaption .Object = "Word.Picture.6", \ .Label = "Picture"
See Also
InsertAddCaption, InsertCaption, InsertCaptionNumbering