mergefield programming Word

  • Thread starter Non-profit whipping boy
  • Start date
N

Non-profit whipping boy

Hi. Can anyone share with me a switch or method to trim a character out of a
mergefield from the output if it exists in the source. To illustrate. I
have a sentence "...thanks to the attendees {MERGEFIELD
attendees_name_combined}."

Unfortunately if attendees_name_combined is "Mr. and Mrs. Smith, Jr.", the
output becomes "...thanks to the attendees Mr. and Mrs. Smith, Jr.."

I want to trim the extra period (.) from the output if it exists in this
instance (or suppress the final period. I was hoping for a switch or an if
... then statement just for the final period, but so far I have not been able
to figure out a solution.
 
M

macropod

Hi,

Try an IF test on the MERGEFIELD, coded as:
{IF{MERGEFIELD attendees_name_combined}= "*." "{MERGEFIELD
attendees_name_combined}" "{MERGEFIELD attendees_name_combined}."}
and deleting the "." from your document's text.


Cheers


"Non-profit whipping boy" <Non-profit whipping
(e-mail address removed)> wrote in message
news:[email protected]...
 
N

Non-profit whipping boy

Perfect! Thank you!

macropod said:
Hi,

Try an IF test on the MERGEFIELD, coded as:
{IF{MERGEFIELD attendees_name_combined}= "*." "{MERGEFIELD
attendees_name_combined}" "{MERGEFIELD attendees_name_combined}."}
and deleting the "." from your document's text.


Cheers


"Non-profit whipping boy" <Non-profit whipping
(e-mail address removed)> wrote in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top