Article ID: 258512 - Last Review: May 14, 2007 - Revision: 5.2 How to automate Word from Visual Basic to create a mail merge for mailing labelsThis article was previously published under Q258512 On This PageSUMMARY This article describes how to automate Microsoft
Office Word from a Microsoft Visual Basic application to create and to execute a mail
merge for mailing labels. MORE INFORMATION The sample code in this article uses a tab-delimited text
file for the data source. The text file has the following fields:
When you create the data source, remember to separate the fields (columns) by using a tab character and to separate the records (rows) by using a carriage return. The following is an example of how the text file might appear: Contact_Name Address City Postal_Code Country Maria Anders Obere Str. 57 Berlin 12209 Germany Thomas Hardy 120 Hanover Sq. London WA1 1DP UK Hanna Moos Forsterstr. 57 Mannheim 68306 Germany Laurence Lebihan 12, rue des Bouchers Marseille 13008 France Step-by-step example
REFERENCES
For more information about how to automate Word or about how to create mail merge documents, click the following article numbers to view the articles in the Microsoft Knowledge Base:
258523
(http://support.microsoft.com/kb/258523/
)
How to determine the number of merged records before executing a mail merge
220607
(http://support.microsoft.com/kb/220607/
)
How to automate Microsoft Word to perform mail merge from Visual Basic
244219
(http://support.microsoft.com/kb/244219/
)
How to automate mail merge in Word 2000 using Visual J++ (Java)
220911
(http://support.microsoft.com/kb/220911/
)
How to automate Microsoft Word to perform a mail merge using Visual C++ and MFC
212034
(http://support.microsoft.com/kb/212034/
)
How to create mailing labels by using Mail Merge in Word
209812
(http://support.microsoft.com/kb/209812/
)
Mail merge macro fails to record label number
| Article Translations
|
Back to the top
