Add Method (MailMergeFields Collection)
Applies To
MailMergeFields collection object.
Description
Adds a mail merge field to the data source document.
Syntax
expression.Add(Range, Name)
expression Required. An expression that returns a MailMergeFields object.
Range Required Range. The range where you want the field to appear. This field replaces the range, if the range isn't collapsed.
Name Required String. The name of the field.
See Also
AddAsk method, AddFillIn method, AddIf method, AddMergeRec method, AddMergeSeq method, AddNext method, AddNextIf method, AddSet method.
Example
This example replaces the selection with a mail merge field named "MiddleInitial."
ActiveDocument.MailMerge.Fields.Add Range:= Selection.Range, _
Name:="MiddleInitial"