Field.Code Property
Word Developer Reference |
Returns a Range object that represents a field's code. Read/write.
Syntax
expression.Code
expression A variable that represents a Field object.
Remarks
A field's code is everything that's enclosed by the field characters ({ }) including the leading space and trailing space characters. You can access a field's code without changing the view from field results.
Example
This example displays the field code for each field in the active document.
Visual Basic for Applications |
---|
|
This example changes the field code for the first field in the active document to CREATEDATE.
Visual Basic for Applications |
---|
|
This example determines whether the active document includes a mail merge field named "Title."
Visual Basic for Applications |
---|
|
See Also