Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-02-2014, 11:26 AM
BenEWill BenEWill is offline Delete paragraph base on merge field Windows 7 32bit Delete paragraph base on merge field Office 2010 32bit
Novice
Delete paragraph base on merge field
 
Join Date: Jul 2014
Posts: 1
BenEWill is on a distinguished road
Default Delete paragraph base on merge field

Hi,



I'm trying to get the hang of this stuff and I have a long way to go. I am trying to figure out if it's possible to delete a paragraph if a merge field is null. I have a field which may have a cosponsor name and a paragraph in my template with a third paragraph to the cosponsor. If the cosponsor field is null I want to delete the third paragraph. Is this possible? How?

TIA,
Ben
Reply With Quote
  #2  
Old 07-02-2014, 02:52 PM
macropod's Avatar
macropod macropod is offline Delete paragraph base on merge field Windows 7 32bit Delete paragraph base on merge field 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

In that case, you need to embed the entire cosponsor paragraph inside an IF field, coded along the lines of:
{IF{MERGEFIELD cosponsor}<> "" "cosponsor paragraph¶
"}
or:
{IF«cosponsor»<> "" "cosponsor paragraph¶
"}

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 practicable to add them via any of the standard Word dialogues. Likewise, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar. The spaces represented in the field construction are all required. Instead of the ¶, you should use a real paragraph break.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete paragraph base on merge field How to delete all the punctuation marks from a paragraph? Jamal NUMAN Word 3 02-26-2019 02:33 PM
can't delete paragraph mark at end of document kb Word 10 10-06-2017 02:32 PM
Delete paragraph base on merge field How to ignore a mail merge field if the field is blank redzan Mail Merge 1 05-16-2013 08:34 AM
How do I set up the fields in mail merge word 07 from my data base mbcrabber Mail Merge 4 06-06-2010 01:25 PM
Need help creating a data base for mail merge. acedking90 Mail Merge 0 07-27-2009 11:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:29 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