How to automate Word to perform a client-side Mail Merge using XML from SQL Server (285176)
The information in this article applies to:
- Microsoft Office Word 2003
- Microsoft Word 2000
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- Microsoft Active Server Pages
This article was previously published under Q285176 SUMMARY This article demonstrates how to automate Microsoft Word
2000 and Microsoft Office Word 2003 from client-side script to perform a mail
merge for labels. Word does not have a direct method for using XML data as the
data source for a mail merge. The sample illustrates Active Server Pages (ASP)
code that streams an XML recordset from a Web server to a client. Client-side
script converts this XML data to a delimited text file that is local to the
client and then automates Word to perform a mail merge by using the local text
file as the mail merge data source. REFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
195826
PRB: CreateObject Fails from
Client-Side Scripts
258512 How To
Automate Word from Visual Basic to Create a Mail Merge for Mailing
Labels
278260 How To Use
Microsoft Foundation Classes (MFC) to Automate Word and Create a Mail Merge for
Mailing Labels
263247 How To
Obtain an ADO Recordset from XML
252767 How To Get
XML Representation Of an ADO Recordset in Visual Basic
Modification Type: | Major | Last Reviewed: | 3/23/2006 |
---|
Keywords: | kbAutomation kbhowto KB285176 |
---|
|