Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 09-24-2019, 09:02 PM
macropod's Avatar
macropod macropod is offline Document Merge and IF statement Windows 7 64bit Document Merge and IF statement 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

The fields in your document are not mergefields - they're formfields containing text strings like:
{FLPM2030_V.FL2030_CUSADD_ADD3}
That also means the document isn't being populated via a mailmerge, so mailmerge techniques, per se, won't work. For the field in question, though, whose formfield bookmark name is 'Text2', you might be able to use a field coded as:
{IF{REF Text2}<> " " ","}
Whether that would work depends on whether the formfields survive whatever document-update process your system employs. If the formfields get replaced with the output text, the above won't work.

Note: The field brace pairs (i.e. '{ }') for the above field coding example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); 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. The spaces represented in the field construction are all required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
condition statement, document merge, mail merge code



Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a Select statement in Excel to an update statement shabbaranks Excel Programming 5 10-31-2018 11:47 PM
Mail Merge If statement kevinatshale Mail Merge 1 03-07-2013 04:36 PM
Document Merge and IF statement Mail Merge Function not Noticing 'True' vs. 'False' Statement danellekent Mail Merge 1 04-27-2012 02:19 AM
Document Merge and IF statement Mail merge will not format date field generated by Excel IF statement borntorun75 Mail Merge 3 12-16-2011 06:28 AM
Document Merge and IF statement Select statement to a new document ishaw Word 1 10-17-2011 02:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:35 AM.


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