[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

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: This element is generally used in conjunction with the behavior of an application to customize aspects of the mail merge user interface and experience independent of the WordprocessingML file format. For example, if a given WordprocessingML merged document contains a mainDocumentType element with its val attribute equal to envelopes, the hosting application may surface a piece of user interface specific to creating envelopes when the given document is opened.

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. end note]

[Example: Consider the WordprocessingML below:

<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. end example]

Parent Elements

mailMerge2.14.20)

 

Attributes

Description

val (Mail Merge Source Document Type)

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

 

[Example: Consider the WordprocessingML below:

 

<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. end example]

 

The possible values for this attribute are defined by the ST_MailMergeDocType simple type2.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>