![merging excel and word for labels merging excel and word for labels](https://cdn.ablebits.com/_img-blog/mail-merge/mail-merge-from-excel.png)
![merging excel and word for labels merging excel and word for labels](https://support.content.office.net/en-us/media/ab0d4d27-dcd4-4479-8f8f-13155fdb1a81.jpg)
Following that, go to Mailings>Preview Results>Preview Results and the mailing labels merge will appear for your review.
#Merging excel and word for labels how to
In this tutorial, I will show you how to create a mailing label merge using Excel and Word, so that you can mail out your wonderful created letters from the successful mail merge in the previous tutorial. A mailing label document is created by using data that is taken from the data source.Since you probably have learned by now how to do a mail merge with Excel and Word, how about I show you how you can use the same principles and create a mailing label mail merge using both Excel and Word. Press the F5 key to run the program, and then click Command1.
#Merging excel and word for labels code
If the data source has a different path or a different file name, modify this line in the code accordingly. The Name argument for the OpenDataSource method in this code references the data source as c:\data.txt. 'Prevent save to Normal template when user exits Word 'Close the original document and make Word visible so that 'Execute the mail merge to generate the labels. Name:="5160", Address:="", _ĪutoText:="MyLabelLayout", LaserTray:=wdPrinterManualFeed 'You can specify the label number you want to use for the output Complete the merge Perform the merge In the Mail Merge task pane verify that the Complete the merge step is displayed. Create a sheet of Avery mailing labels from an Excel worksheet of names and addresses. 'you added - 5160 is the label number to use for this sample. On your Word document highlight the field you want to populate with the data from Excel.
![merging excel and word for labels merging excel and word for labels](https://www.morovia.com/kb/10028/mail-merge-excel-datasource.png)
'Create the new document for the labels using the AutoText entry OpenDataSource Name:="C:\data.txt" 'Specify the data source here
![merging excel and word for labels merging excel and word for labels](https://i.pinimg.com/originals/c9/80/3d/c9803d750e9d54930f5bb3cf258a3f72.jpg)
'a tab-delimited text file as the data source. 'Set up the mail merge type as mailing labels and use 'that the AutoText entry for the label layout 'Merge fields in document no longer needed now Set oAutoText = ("MyLabelLayout", oDoc.Content) 'for your labels - to use this as a layout, you can add it 'you can use the range that contains the merge fields as a layout 'Insert the mail merge fields temporarily so that Set oApp = CreateObject("Word.Application")