View Single Post
 
Old 03-26-2012, 08:38 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi bekz,

This is easily done by embedding the entire 3rd page in an IF field coded like:
{IF«DFKEY1»<> "" "The entire 3rd page"}
To do this, simply insert a «DFKEY1» mergefield at the start of the 3rd page, then select the entire 3rd page, then press Ctrl-F9 to enclose it in a pair of field braces, so that you get something like {«DFKEY1»'The entire 3rd page'}. Then add the remaining text that makes up the IF test, including the double-quotes before & after the 3rd page's content. Be careful to inlcude the spaces shown in the field construction.

If, as I suspect, you have a page break at the end of the 2nd page, you'll need to include that in the field as well. The simplest way of doing that is to insert another field into the expression, thus: {IF«DFKEY1»<> "" "{QUOTE 12}The entire 3rd page"}, then delete the actual page break at the end of the 2nd page. When you're done, press F9 to update the field code, then run your mailmerge.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote