Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-05-2018, 05:59 PM
macropod's Avatar
macropod macropod is offline Mail merge choosing which location Windows 7 64bit Mail merge choosing which location 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

That's easily done via two simple IF tests. For example:
{IF{MERGEFIELD FieldName}= "X" "conditional output for X"}{IF{MERGEFIELD FieldName}= "XYZ" "conditional output for XYZ"}
or:
{IF«FieldName»= "X" "conditional output for X"}{IF«FieldName»= "XYZ" "conditional output for XYZ"}
where 'FieldName' is the name of the field containing the X & XYZ strings. If the conditional output is to start a new page, simply insert a manual page break as the first character of the conditional output.

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either). The spaces represented in the field constructions are all required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Choosing Mail Merge templates and excel Data Sources using drop downs dushan997 Mail Merge 3 08-04-2017 07:54 PM
Mail Merge to multiple employees in multiple locations as PDF by location GFiz Mail Merge 1 05-13-2017 08:01 PM
Mail merge choosing which location Unwanted folders when choosing form location marcoponte Outlook 1 12-16-2014 05:40 PM
Mail merge how to link mail merge field value to a column heading dsummers Mail Merge 1 05-08-2014 02:59 PM
Mail merge choosing which location merge to excel in dynamic location mjlaw Mail Merge 1 03-22-2012 11:16 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft