mailMergeElt complexType

Defines the collection of settings for a mail-merge operation.

## Type Information

Namespace | http://schemas.microsoft.com/office/word/2003/wordml
Schema name | wordnet

## Elements and Attributes

### Child Elements

Element | Type | Description
--- | --- | ---
mainDocumentType | mailMergeDocTypeProperty | Specifies a mail-merge main document type. The main document is the document that contains information that is the same for each version of the merged document -- for example, the return address in a form letter.
linkToQuery | onOffProperty | Specifies whether a mail-merge main document contains a query to its data source. If specified, the mail-merge document does not link to the data source by means of Microsoft Query.
dataType | mailMergeDataTypeProperty | Specifies the type of mail-merge data source (such as an Excel spreadsheet or Access database) and the method of data access (for example, by means of ODBC or DDE).
defaultSQL | onOffProperty | Specifies whether the mail merge will use the default SQL query string.
connectString | stringProperty | Represents the connection string used to open an external data source.
query | stringProperty | Contains the query that is run against the data source.
dataSource | stringProperty | Specifies the path to the mail-merge data source.
headerSource | stringProperty | Specifies the path to the mail-merge header source.
doNotSuppressBlankLines | onOffProperty | Causes Word not to print blank lines when a data field is empty.
destination | mailMergeDestProperty | Specifies the output of a mail merge.
addressFieldName | stringProperty | Contains the name of the data field with the destination e-mail or fax address.
mailSubject | stringProperty | Contains the text that appears in the subject line of the mail-merge destination e-mail or fax.
mailAsAttachment | onOffProperty | Sends the merged document to e-mail recipients as an attachment.
viewMergedData | onOffProperty | Specifies that merge data is displayed.
activeRecord | decimalNumberProperty | Specifies the active record that a main mail-merge document displays.
checkErrors | decimalNumberProperty | Specifies which mail-merge error checking and reporting option runs. 1) Simulate the merge and report errors in a new document. 2) (default) Complete the merge, pausing to report each error as it occurs. 3) Complete the merge without pausing; report errors in a new document.
odso | odsoElt | Contains settings related to the Office Data Source Object.

### Attributes

None.

## Definition

XML
    <xsd:complexType name="mailMergeElt" ">

        <xsd:sequence>
          <xsd:element name="mainDocumentType" type="mailMergeDocTypeProperty" minOccurs="1">

          </xsd:element>
          <xsd:element name="linkToQuery" type="onOffProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="dataType" type="mailMergeDataTypeProperty" minOccurs="1">

          </xsd:element>
          <xsd:element name="defaultSQL" type="onOffProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="connectString" type="stringProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="query" type="stringProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="dataSource" type="stringProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="headerSource" type="stringProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="doNotSuppressBlankLines" type="onOffProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="destination" type="mailMergeDestProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="addressFieldName" type="stringProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="mailSubject" type="stringProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="mailAsAttachment" type="onOffProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="viewMergedData" type="onOffProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="activeRecord" type="decimalNumberProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="checkErrors" type="decimalNumberProperty" minOccurs="0">

          </xsd:element>
          <xsd:element name="odso" type="odsoElt" minOccurs="0">

          </xsd:element>
        </xsd:sequence>
      </xsd:complexType>

©2006 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at:
http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice12.asp