MailMergeDataField.Value Property

Word Developer Reference

Returns the contents of the mail merge data field or mapped data field for the current record. Read-only String.

Syntax

expression.Value

expression   Required. A variable that represents a MailMergeDataField object.

Remarks

Use the ActiveRecord property to set the active record in a mail merge data source.

Example

This example displays the contents of the active record in the data source attached to Main.doc.

Visual Basic for Applications
  For Each dataF In _
    Documents("Main.doc").MailMerge.DataSource.DataFields
    If dataF.Value <> "" Then dRecord = dRecord & _
        dataF.Value & vbCr
Next dataF
MsgBox dRecord

See Also