Word.Interfaces.FieldLoadOptions interface

Represents a field.

Remarks

[ API set: WordApi 1.4 ]

Properties

$all

Specifying $all for the LoadOptions loads all the scalar properties (e.g.: Range.address) but not the navigational properties (e.g.: Range.format.fill.color).

code

Specifies the field's code instruction.

data

Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it.

kind

Gets the field's kind.

locked

Specifies whether the field is locked. true if the field is locked, false otherwise.

parentBody

Gets the parent body of the field.

parentContentControl

Gets the content control that contains the field. Throws an ItemNotFound error if there isn't a parent content control.

parentContentControlOrNullObject

Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTable

Gets the table that contains the field. Throws an ItemNotFound error if it isn't contained in a table.

parentTableCell

Gets the table cell that contains the field. Throws an ItemNotFound error if it isn't contained in a table cell.

parentTableCellOrNullObject

Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableOrNullObject

Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

result

Gets the field's result data.

showCodes

Specifies whether the field codes are displayed for the specified field. true if the field codes are displayed, false otherwise.

type

Gets the field's type.

Property Details

$all

Specifying $all for the LoadOptions loads all the scalar properties (e.g.: Range.address) but not the navigational properties (e.g.: Range.format.fill.color).

$all?: boolean;

Property Value

boolean

code

Specifies the field's code instruction.

code?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.4 ]

Note: The ability to set the code was introduced in WordApi 1.5.

data

Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it.

data?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

kind

Gets the field's kind.

kind?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

locked

Specifies whether the field is locked. true if the field is locked, false otherwise.

locked?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

parentBody

Gets the parent body of the field.

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

parentContentControl

Gets the content control that contains the field. Throws an ItemNotFound error if there isn't a parent content control.

parentContentControl?: Word.Interfaces.ContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

parentContentControlOrNullObject

Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

parentTable

Gets the table that contains the field. Throws an ItemNotFound error if it isn't contained in a table.

parentTable?: Word.Interfaces.TableLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

parentTableCell

Gets the table cell that contains the field. Throws an ItemNotFound error if it isn't contained in a table cell.

parentTableCell?: Word.Interfaces.TableCellLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

parentTableCellOrNullObject

Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

parentTableOrNullObject

Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

result

Gets the field's result data.

result?: Word.Interfaces.RangeLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

showCodes

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies whether the field codes are displayed for the specified field. true if the field codes are displayed, false otherwise.

showCodes?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

type

Gets the field's type.

type?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]