

From the Select document type option list select Labels. The Mail Merge task pane appears on the right of the screen. From the drop-down list select S tep by Step Mail Merge Wizard. If this solves the problem, please view your first post in this thread and click the Edit button (top right in the post) and add Solved in front of the subject. Start a new blank document and then on the Mailings tab in the Start Mail Merge group click Start Mail Merge. OpenDataSource Name:=StrMMSrc, ReadOnly:=True, AddToRecentFiles:=False, _ Try Re: Can't fill address labels from spreadsheet found by searching the forum with mail merge. OpenDataSource Name:'C:data.txt' Specify the data source here Create the new document for the labels using the AutoText entry you added - 5160 is the label number to use for this sample. Documents.Open(Filename:=StrMMDoc, AddToRecentFiles:=False, ReadOnly:=True, Visible:=False) Set up the mail merge type as mailing labels and use a tab-delimited text file as the data source. StrMMDoc = ThisWorkbook.Path & "\MailMergeMainDocument.doc" But if you are like other people who hate Word, there is another way you can print labels directly from Excel.
Mail merge from excel to labels code#
'Note: this code requires a reference to the Word object modelĭim wdApp As New Word.Application, wdDoc As Word.Documentĭim StrMMSrc As String, StrMMDoc As String Excel files are supposed to be used as sources for creating labels in Word through the mail merge process. Having created the mailmerge main document with a single label, you can then use code like the following: Sub RunMerge() Finally, merge fields in Word by going to Mailings > Insert Merge Field. Mailings > Select Recipients > Use an Existing List > Open the sheet. Next, in Word, pick Mailings > Start Mail Merge > choose type. What you need to do is create a mailmerge main document with a single label containing all the mergefields required for that label, rather than a sheet of labels, and combine that with an ordinary letter merge. First, organize the data into one Excel sheet. I am fairly new to VBA and would appreciate any help! This is how the data looks like before and after the code is run from the VBA Editor. Set oWord = CreateObject("Word.Application") Set oHeaders = Range("A1").CurrentRegion.Rows(1) It appears to work but I dont think it stops at the end of my data as in when i ''.
Mail merge from excel to labels how to#
Sub LabelMerge()ĭim oWord As Word.Application, oDoc As Word.Documentĭim sPath As String, I As Integer, oHeaders As Range 1 Hi Wonder if anyone can help, I find some help on youtube on how to get this working. To insert mail merge fields, go to the Mailing tab and select the ‘Address Block.

The placeholders will be filled up with the data from your Excel mailing list after the merging is complete. These fields will serve as templates for your worksheet’s column headings. I was wondering if there is a way that the data from each row in my Excel Spreadsheet could go to different pages in Word? The code is given below. When you add mail merge fields to your labels, they become more useful. I found a code online that gets all the data into one page on Word. I tried following the Print labels using Excel data in a Word mail merge via the Microsoft Office Assitanance web help pages. I have been working on a macro that adds data to a page on Word in the form of a Mail Merge label.
