|
|
|
|
|||||||||
|
|
|||||||||
The ProblemWhen you create a Word MailMerge to print Labels, you set up the first label with the fields and text that you need, then use the Propagate Labels function to copy that label's layout to all the other labels. Except that the Propagate Labels function does not work - for example, it fills the first row of labels and the last two labels on the page, but none of the others. BackgroundThis particular problem can occur on Tablet PCs running Windows XP Tablet Edition SP2 and Word 2003 or Word 2007. There is a small amount of evidence that the problem may also occur on Windows Vista, but certainly similar symptoms have been reported. WorkaroundsThe following Microsoft Knowledgebase article describes the problem and some possible workarounds:"Merge fields do not replicate in labels in a mail merge document in Word 2007 or Word 2003 on a Windows XP Tablet PC" http://support.microsoft.com/kb/898630 Something I would add to that article is that if you do use Propagate Labels on a Tablet, the table uses to do the layout quickly becomes corrupted and you may find that Word crashes. In my experience, you should avoid Propagate Fields on a Tablet with Windows XP SP2. If you do use it by accident, I suggest you use Word's Undo feature to undo the attempted Propagate, immediately. I have generally found that the corruption is undone or does not occur in that case. This article also contains two Word VBA macros to do the propagation.The first was written by Microsoft Word MVP Doug Robbins (I've made two minor changes to his code). The second was based on his code and was written by me. Surely replicating label contents should be really easy? Each label is just a cell in a table so all you need to do is copy the contents of cell 1 to all the other cells and insert a { NEXT } field, right? Well, not quite, because some Label layouts have "spacer" columns between each pair of "label" columns. For example, the layout for Avery A4/A5 label type J8651 has 65 labels arranged in 13 rows of 5 columns. But the layout generated by Word contains 9 columns - e.g. the first row is as follows:
In this case a macro obviously needs to skip the narrow "spacer" columns and only copy the contents of cell 1 to the odd-numbered columns.
How does Word tell whether it needs to skip columns in some layouts but not others?
Well, I don't know exactly, but I believe Word looks at the widths of the columns. If it discovers that the odd-numbered columns 1,3,5 etc. are all the same width X and the even-numbered columns all have the a different width Y, and X is not the same as Y, it skips columns. Otherwise, it copies the contents to every cell. (I don't think that is the whole story but it is the theory that macro 2 relies on)
Macro 1 (by Doug) does not rely on that. It assumes you have created your label layout in the usual way and have left { NEXT } fields («Next Record» fields) as Word has inserted them, i.e. in "label" cells but not "spacer" cells. The macro - adds a «Next Record» field to the beginning of cell 1 - copies the content of cell 1 - pastes the copy into every table cell that already contains at least one field - removes the «Next Record» field from the beginning of cell 1
If you are not used to working with macros, see the following article for information on how to install and run these macros:
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm
Macro 1
Sub MailMergePropagateLabel() Macro 2
Sub MailMergePropagateLabel2()
|
| Please post any follow-up questions to this article in the Microsoft public newsgroup on mailmerge and fields. If you are using a newsreader such as Outlook Express, the server is at news://news.microsoft.com and the Mailmerge newsgroup is at news://news.microsoft.com/microsoft.public.word.mailmerge.fields. Otherwise, you can go to the Microsoft Communities home at http://www.microsoft.com/communities and look for the group. For some reason it is currently named "Mailmerge and Fax" | ||
| Disclaimer | Peter Jamieson's Tip Pages: Copyright © 2005-2007, Peter Jamieson |
|