Word.Interfaces.FieldCollectionLoadOptions interface

Contains a collection of Word.Field objects.

Remarks

[ API set: WordApi 1.4 ]

Important: To learn more about which fields can be inserted, see the Word.Range.insertField API introduced in requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the Word UI on the web primarily only supports fields as read-only (see Field codes in Word for the web), the Addin field is editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of Insert, edit, and view fields in Word.

Properties

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

code

For EACH ITEM in the collection: Specifies the field's code instruction.

data

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: Gets the field's kind.

locked

For EACH ITEM in the collection: Specifies whether the field is locked. true if the field is locked, false otherwise.

parentBody

For EACH ITEM in the collection: Gets the parent body of the field.

parentContentControl

For EACH ITEM in the collection: Gets the content control that contains the field. Throws an ItemNotFound error if there isn't a parent content control.

parentContentControlOrNullObject

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: Gets the table that contains the field. Throws an ItemNotFound error if it isn't contained in a table.

parentTableCell

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

parentTableCellOrNullObject

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: Gets the field's result data.

type

For EACH ITEM in the collection: Gets the field's type.

Property Details

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

$all?: boolean;

Property Value

boolean

code

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: Gets the field's kind.

kind?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]

locked

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: Gets the parent body of the field.

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

parentContentControl

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: Gets the field's result data.

result?: Word.Interfaces.RangeLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.4 ]

type

For EACH ITEM in the collection: Gets the field's type.

type?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.5 ]