Skip to content

Latest commit

 

History

History
62 lines (37 loc) · 1.34 KB

Word.View.MailMergeDataView.md

File metadata and controls

62 lines (37 loc) · 1.34 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
View.MailMergeDataView property (Word)
vbawd10.chm161808389
vbawd10.chm161808389
Word.View.MailMergeDataView
2252ea96-70ac-f9f1-554f-59a8337c9b5c
06/08/2017
medium

View.MailMergeDataView property (Word)

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

Syntax

expression. MailMergeDataView

expression An expression that returns a 'View' object.

Remarks

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

Example

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

See also

View Object

[!includeSupport and feedback]