Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

mergefield programming Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Non-profit whipping boy - 20 Apr 2006 02:20 GMT
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.
macropod - 20 Apr 2006 11:58 GMT
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

> 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
[quoted text clipped - 8 lines]
> .. then statement just for the final period, but so far I have not been able
> to figure out a solution.
Non-profit whipping boy - 21 Apr 2006 22:43 GMT
Perfect!  Thank you!

> Hi,
>
[quoted text clipped - 20 lines]
> able
> > to figure out a solution.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.