|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How can I automate the mail merge process in word for making labels using the 5160 Avery template?
I am trying to create a macro in word that would run a mail merge using the 5160 US Avery template for labels.
The macro would extract the data from an Excel file and populated into the 5160 Avery template filling the whole page as needed. The problem I'm having when I run my macro is that it display a single label on separate pages. In other words it does not populate the whole page. The code that can make this happen would be very much appreciated. |
#2
|
||||
|
||||
You need to be clearer about what exactly you want to 'automate'. If the merge document is already populated and data attached, then you merely have to click the button on the mailings tab to complete the merge to a new document or the printer.
If you want to print a range of labels from an Excel data source, then you could use http://www.gmayor.com/Envelope_Label_Add_In.htm. It is not mail merge, but the end result is the same ... except you can select the start label position.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
I have attached 2 files to give you an idea on what I am trying to achieve: One is an Excel file with small sample data and the other is a Word document that displays the ending results I'm trying to achieve. I don't want to click on a button in the Mailing tab to complete a mail merge (that's manual stuff). I already know how to do that. I want to create a macro in Word to automate everything. What I mean by everything is the moment you click on a macro button it will run a set of code to extract the data from Excel and populated into Word just like the attached Word document. The macro will do the mail merge for me. Many thanks!
|
#4
|
||||
|
||||
So far, there is nothing in what you've posted or attached that indicates you need anything more than a mundane label merge. At the very least, you should start off by properly populating & formatting the first label. You can then use Word's 'update labels' button to populate the rest. While it's possible to do all of that with a macro, that approach is far harder to maintain than is an ordinary label mail merge main document. Is there a reason you can't use a pre-formatted label mail merge main document? After doing the basic setup (whether manually or programmatically), you could, of course, automate Word from Excel to run the mailmerge, or drive the process with a Word macro, but you haven't provided any details or code that suggests how you're trying to either. For example, where is this 'button' meant to be - in Word or in Excel?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
I have to say I find your comments insulting. Maybe that's not your intention but you sure are coming out that way.
Nobody is twisting your arm to help out. This may be mundane to you but not to me. As previously mentioned I am looking to drive the process with a Word macro. If you're looking for me to provide you with the code then it defeats the purpose of my post. Don't know if you are good with providing me with the code that can do this but that's what I need. Thank you |
#6
|
||||
|
||||
zrobles: If anyone has an attitude problem, it's you. There is nothing about my previous post that any reasonable person would characterize as insulting. Your characterization, though, could be called just that...
Since you can't be bothered explaining what aspects of the merge you need to automate, especially given Word's ability to perform the merge with little more than clicking on the 'Finish & Merge' button after you've done the basic setup (which you'd ordinarily do before automation, anyway), how do you expect any help???? Nothing you've described in your posts to date requires a macro. To say you want to do it with a Word macro makes me wonder even more what the point is, when Word already provides all the tools you need without one. If you were trying to do it from Excel, it'd make a little more sense. BTW, a search of this forum would quickly turn up multiple threads with examples of mailmerge macros!!!
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
macro vba word, mail merge issue, mail merge labels |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail Merge with Avery 8387 | fairchance | Mail Merge | 9 | 07-17-2015 08:05 AM |
Labels are not printed the way they are shown on the screen! (Word 2013 via Mail Merge) | malinneedshelp | Mail Merge | 2 | 12-09-2014 03:08 AM |
Insert picture background in Word mail merge labels | obasanla | Mail Merge | 6 | 11-26-2012 11:53 PM |
Word 2007 problem with Avery labels 8167 | sbradford | Word | 0 | 06-28-2009 08:14 PM |
word 2003 mail merge labels? | JoeGrapes | Mail Merge | 0 | 04-20-2009 12:43 PM |