This topic has not yet been rated - Rate this topic

View.MailMergeDataView Property (Word)

Published: July 16, 2012

True if mail merge data is displayed instead of mail merge fields in the specified window. Read/write Boolean.

expression .MailMergeDataView

expression An expression that returns a View object.

If the specified window isn't a main document, an error occurs.

If the active document includes at least one mail merge field, this example displays mail merge data from the first record in the attached data source.

If ActiveDocument.MailMerge.Fields.Count >= 1 Then 
 ActiveDocument.MailMerge.DataSource.ActiveRecord = 1 
 ActiveDocument.ActiveWindow.View.ShowFieldCodes = False 
 ActiveDocument.ActiveWindow.View.MailMergeDataView = True 
End If

This example switches between viewing mail merge fields and viewing the resulting data.

With ActiveDocument.ActiveWindow.View 
 .ShowFieldCodes = False 
 .MailMergeDataView = Not .MailMergeDataView 
End With

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.