<mainDocumentType> (Source Document Type)

This element specifies the type of a given WordprocessingML source document.

If this element is omitted, then its value shall be assumed to be formLetters.

Note:

In addition, what a hosting application does with the documents that result from importing external data into specified fields can be determined based on the <mainDocumentType> element, but other than this, is independent of a given merged document's WordprocessingML. For example, if a given merged WordprocessingML document contains a <mainDocumentType> element with its @val attribute equal to email, the hosting application may call a email service after importing external data into specified fields, in order to generate emails containing the resulting documents.

WordprocessingML simply provides the <mainDocumentType> that can serve as a trigger for an application to surface user interface specific to a type of mail merge. ]

<w:mailMerge>
  <w:mainDocumentType w:val="formLetters" /></w:mailMerge>

In this example, the source document is of the formLetters type, as specified by the <mainDocumentType >element's @val attribute being equal to formLetters. ]

Parent Elements

<mailMerge>2.14.20)

Attributes

Description

<val> (Mail Merge Source Document Type)

Specifies the type of source document which is specified by the given WordprocessingML document.

<w:mainDocumentType w:val="formLetters" />

This WordprocessingML specifies that a given source document is a formLetters document. This setting implies nothing about the file, but may be interpreted by an application as desired. ]

The possible values for this attribute are defined by the ST_MailMergeDocType simple type (§2.18.61).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_MailMergeDocType">
	<attribute name="val" type="ST_MailMergeDocType" use="required"/>
</complexType>