#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
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] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
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 |