ViewMailMergeFieldCodes Property Example
This example displays the mail merge fields in Main.doc.
ActiveDocument.ActiveWindow.View.ShowFieldCodes = False
With Documents("Main.doc")
.Activate
.MailMerge.ViewMailMergeFieldCodes = True
End With
If the active document is set up for a mail merge operation, this example displays the current data record information in the main document.
ActiveDocument.ActiveWindow.View.ShowFieldCodes = False
Set myMerge = ActiveDocument.MailMerge
If myMerge.State = wdMainAndSourceAndHeader Or _
myMerge.State = wdMainAndDataSource Then
myMerge.ViewMailMergeFieldCodes = False
End If