AddMergeSeq Method

Applies To

MailMergeFields collection object.

Description

Adds a MERGESEQ field to a mail merge main document. Returns a MailMergeField object. A MERGESEQ field inserts a number based on the sequence in which data records are merged (for example, when record 50 of records 50 to 100 is merged, MERGESEQ inserts the number 1).

Syntax

expression.AddMergeSeq(Range)

expression Required. An expression that returns a MailMergeFields object.

Range Required Range object. The location for the MERGESEQ field.

See Also

AddMergeRec method.

Example

This example inserts text and a MERGESEQ field at the end of the active document.

Set myRange = ActiveDocument.Content
myRange.Collapse Direction:=wdCollapseEnd
ActiveDocument.MailMerge.Fields.AddMergeSeq Range:=myRange
myRange.InsertAfter "Sequence Number: "