Syntax
InsertField .Field = text
Remarks
Inserts the specified field at the insertion point.
Argument | Explanation |
.Field | The field type and instructions to insert. For information on a specific field, including syntax and examples, select the field name in the Field dialog box (Insert menu), and then press F1 (Windows) or HELP (Macintosh). The .Field argument accepts a maximum of 255 characters. |
Do not include the field characters ({}), but follow all other syntax rules for field codes. To insert quotation marks in field codes, use Chr$(34).
Examples
This example inserts an AUTHOR field:
InsertField .Field = "AUTHOR"
The following example nests a FILLIN field within a COMMENTS field. The instructions display all field codes, insert a COMMENTS field using InsertField, then insert the FILLIN field using InsertFieldChars.
ToolsOptionsView .FieldCodes = 1 InsertField .Field = "COMMENTS" CharLeft InsertFieldChars Insert "FILLIN " + Chr$(34) + "Type your comment" + Chr$(34)
See Also
InsertFieldChars