|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to suppress double ".." at the end of a sentence when a name ends "Inc."
If there have been previous posts regarding this issue, I apologize. I could not find them. I have a mail merge and many, but not all, of the "owners" are companies ending with "Inc." in their names. The mail merge setup has a sentence ending with a merge field of the Owners' name. How do I suppress the "." in the Owner name if it is followed by text which is a "." so that the sentence does not end with ".."?
The same field is used several places in the document so would not need to suppress the "." in every instance. Thanks in advance. Last edited by dfolzenlogen; 04-03-2022 at 06:29 PM. Reason: clarification |
#2
|
||||
|
||||
You would have to replace the period at the end of the sentence with an IF field that tests for the presence of one at the end of the 'Owner' field, thus:
{IF{MERGEFIELD Owner}<> "*." "."} or: {IF«Owner»<> "*." "."} 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 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. 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] |
#3
|
|||
|
|||
That did the trick!!
Thank you! That did the trick!!
D |
#4
|
|||
|
|||
BTW -- was so excited -- I forgot to thank you!!
Thanks a million!! |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2003: VBA "Function" causes "#VALUE!" errors after running "insert/delete row" custom macro | Matt C | Excel Programming | 2 | 01-08-2022 06:03 AM |
Combine "sort within groups" and "identify duplicate/unique values" in two different variables. | civilcervant | Excel | 3 | 06-12-2017 07:27 AM |
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas | jocke321 | Word VBA | 2 | 12-10-2014 11:27 AM |
How to choose a "List" for certain "Heading" from "Modify" tool? | Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |
Replacing a single "l" with a double "ll" | MShroff | Word | 8 | 01-19-2011 08:43 AM |