ToolsManageFields

Syntax

ToolsManageFields [.FieldName = text] [, .Add] [, .Remove] [, .Rename] [, .NewName = text]

Remarks

Adds, removes, or renames a field name in a mail-merge data source or header source. If the active document does not contain a table with the specified field in the first row of the table, an error occurs.

Argument

Explanation

.FieldName

The field name you want to add, remove, or rename

.Add

Adds the specified field name to a new table column

.Remove

Removes the specified field name and the associated table column

.Rename

Renames the specified field name

.NewName

A new name for the field; used with .Rename


Example

This example renames the "Name1" field to "FirstName":


ToolsManageFields .FieldName = "Name1", .NewName = "FirstName", \
        .Rename

See Also

MailMergeEditDataSource