Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.21 KB

Word.MailMerge.MainDocumentType.md

File metadata and controls

56 lines (34 loc) · 1.21 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
MailMerge.MainDocumentType property (Word)
vbawd10.chm153092097
vbawd10.chm153092097
Word.MailMerge.MainDocumentType
6275d472-b513-1879-e48a-326f21d6321d
06/08/2017
medium

MailMerge.MainDocumentType property (Word)

Returns or sets the mail merge main document type. Read/write WdMailMergeMainDocType.

Syntax

expression. MainDocumentType

expression Required. A variable that represents a 'MailMerge' object.

Example

This example creates a new document and makes it a catalog main document for a mail merge operation.

Set myDoc = Documents.Add 
myDoc.MailMerge.MainDocumentType = wdCatalog

This example determines whether the active document is a main document for a mail merge operation, and then it displays a message in the status bar.

Set doc = ActiveDocument 
If doc.MailMerge.MainDocumentType = wdNotAMergeDocument Then 
 StatusBar = "Not a mail merge main document" 
Else 
 StatusBar = "Document is a mail merge main document." 
End If

See also

MailMerge Object

[!includeSupport and feedback]