1 / 16

Mail Merge in WordProcessingML

Mail Merge in WordProcessingML. Article by Sheela E.N Sonata Software Limite GI1 10 張筱懿. Introduction. This article briefly explains the concept of Mail Merge and how this information is stored in WordProcessingML.

karik
Download Presentation

Mail Merge in WordProcessingML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mail Merge in WordProcessingML Article by Sheela E.N Sonata Software Limite GI1 10 張筱懿

  2. Introduction • This article briefly explains the concept of Mail Merge and how this information is stored in WordProcessingML. • A mail merge is a word processing feature that allows in creating common letters, mailing labels, envelopes, or cataloging documents to a group of people as stored in a database.

  3. We use mail merge when we want to create a set of documents that are essentially in a template format but only in a single place contains unique information. • For example, in a letter that announces a new product to all its customers, the company logo and the text about the product is common and will appear in each letter, while the customer address and greeting line will be different in each letter.

  4. The two key parts of the mail merge process are • Connecting to an external data source • Populating mail merge fields with external data

  5. Connecting to an external data source • The connection details of the external data source are mentioned in the settings.xml file as

  6. <w:mailMerge> • The <w:mailMerge> element specifies the following information of the hosting application to connect to an external data source – • w:mainDocumentType — specifies the type of the mail merge. The possible types are • formLetters. • Email • Envelopes • Fax • mailingLabels • Catalog • w:query – specifies the table to be queried.

  7. w:dataSource — specifies the link to the external data source. The details are stored in document setting part relationship. • w:viewMergedData — specifies that the merged document shall display the data from the specified external data source where merge fields have been inserted. • w:activeRecord — specifies which record within the data source should be displayed. • w:odso — The Office Data Source Object (odso) settings is optional details which specifies a group of additional settings for the mail merge information which comprises an extension to the standard settings stored with a mail merge.

  8. The Office Data Source Object Settings also contains a link to another part (mailMergeRecipientData) which contains details about all of the inclusion/exclusion data for the contents of the specified mail merge data source and is represented as

  9. Recipient data part • The details of the record inclusion/exclusion in mail merge recipient data part are stored as

  10. The <w:recipientData> element specifies the following details for the inclusion/exclusion of records within mail merged document. • w:column — specifies the column on which the filter has applied based on the value of the column (like where clause on that column). • w:uniqueTag — specifies the contents of a given record within the specified external data source, in the column containing unique data for every record within the external data source for inclusion/exclusion of records for mail merge. The value specifies that this should be the base64-encoded value of the unique tag value as specified by the data source. This element is used along with <w:column> element.

  11. w:active — specifies whether the record to be shown on not. The default value is 1 which indicates the record is included for the mail merge. • If this part is not present, it indicates that all the records within the data source are included for the mail merge.

  12. Main document part • In the main document part (document.xml by default), the merge fields are populated by extracting data from external data source and the same is represented as

  13. In the above XML snippet, the merge field ‘FirstName’ is inserted in a WordprocessingML document which connects to the external data source. • When the mail merge takes place, the data from the FirstName column will be populated into the field FirstName (<w:fldSimple w:instr="MERGEFIELD FirstName">) within the merged WordprocessingML document.

  14. Result • The word document containing mail merge field place holders is illustrated as

More Related