mail merge in wordprocessingml

16
Mail Merge in WordProcessin gML Article by Sheela E.N Sonata Software Limite GI1 10 張張張

Upload: karik

Post on 12-Jan-2016

38 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Mail Merge in WordProcessingML

Mail Merge in WordProcessingML

Article by Sheela E.NSonata Software Limite

GI1 10 張筱懿

Page 2: Mail Merge in WordProcessingML

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.

Page 3: Mail Merge in WordProcessingML

• 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 prod

uct 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.

Page 4: Mail Merge in WordProcessingML

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

data

Page 5: Mail Merge in WordProcessingML

Connecting to an external data source

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

Page 6: Mail Merge in WordProcessingML
Page 7: Mail Merge in WordProcessingML

<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 ty

pe of the mail merge. The possible types are• formLetters.• Email• Envelopes• Fax• mailingLabels• Catalog

• w:query – specifies the table to be queried.

Page 8: Mail Merge in WordProcessingML

• 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.

Page 9: Mail Merge in WordProcessingML

• 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 

Page 10: Mail Merge in WordProcessingML

Recipient data part

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

Page 11: Mail Merge in WordProcessingML

• 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.

Page 12: Mail Merge in WordProcessingML

• 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.

Page 13: Mail Merge in WordProcessingML

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

Page 14: Mail Merge in WordProcessingML

• 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.

Page 15: Mail Merge in WordProcessingML

Result

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

Page 16: Mail Merge in WordProcessingML