Destination class

Office 2013 and later

Merged Document Destination. When the object is serialized out as xml, its qualified name is w:destination.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class Destination : OpenXmlLeafElement

[ISO/IEC 29500-1 1st Edition]

destination (Merged Document Destination)

This element specifies what the result which shall be generated when a mail merge is carried out on a given WordprocessingML source document. In other words, this element is used to specify what is to be done with the merged documents that result from populating the fields within a given merged WordprocessingML document with data from the specified external data source.

If this element is omitted, then the default destination of merged documents shall be assumed to be of type newDocument.

[Note: The aspects of the mail merge outside of connecting to an external data source and populating the fields within a given merged document with external data from the specified external data source are not specified by /IEC 29500.

For example, if a given merged WordprocessingML document contains a destination element with its val attribute equal to email, the hosting application can surface a user interface specific to creating emails with the data resulting from populating fields within a given merged WordprocessingML document with external data from the specified external data source. WordprocessingML only provides a flag (via the destination element) to tell the hosting application to surface this user interface. end note]

[Example: Consider a WordprocessingML source document containing the following WordprocessingML:

<w:mailMerge>
  <w:destination w:val="newDocument" />
  …</w:mailMerge>

The destination element's val attribute is set to newDocument, specifying that when the mail merge is carried out, the source document must be used to generate a specified number of new documents, which can be handled as appropriate. end example]

Parent Elements

mailMerge (§17.14.20)

Attributes

Description

val (Mail Merge Merged Document Type)

Specifies the type of merged documents which shall be the result of carrying out a mail merge on a given source WordprocessingML document.

[Example: Consider the WordprocessingML mail merge data specified as follows:

<w:destination w:val="email" />

This specifies that a given merged WordprocessingML document is used by the hosting application to generate e-mails containing the static contents of the merged document as well as external data populated into mapped fields. end example]

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

[Note: The W3C XML Schema definition of this element’s content model (CT_MailMergeDest) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: