Microsoft Word Suite
84
Class: data merge data field
Plural
data merge data fields
Represents a single mail merge field in a data source. The data merge data fields list includes all the
data fields in a data merge data source (for example, Name, Address, and City).
Use data merge data field index, where index is the data field name or the index number, to return a
single data merge data field object. The index number represents the position of the data field in the
data merge data source. The following example retrieves the first value from the FName field in the
data source attached to the active document.
get data merge data field value of data merge data field "FName" of ¬
data source of data merge of active document
The following example displays the name of the first field in the data source attached to the active
document.
display dialog name of data merge data field 1 of data source of data merge ¬
of active document as string
You cannot add fields to the data merge data fields list. All data fields in a data source are
automatically included in the data merge data fields list.
Properties
data merge data field value
Returns the contents of the data merge data field for the current record. Use the active record
property to set the active record in a data merge data source. Read-only.
entry index
Returns a number that indicates the position of data merge data field in the data merge data
fields list. Read-only.
name
Returns the name of the data merge field. Read-only.
Class: data merge data source
Plural
data merge data sources
Elements
data merge field name
data merge data field
Represents the data merge data source in a data merge operation.
To return the data merge data source object, use the data source property of the data merge class.
The following example displays the name of the data source associated with the active document.
if name of data source of data merge of active document is not "" then ¬
display dialog name of data source of data merge of active document ¬
as
string