#1   Report Post  
chartley
 
Posts: n/a
Default Comma

How do I insert a comma only before a merge field that is populated? In
other words, no comma if the merge field following the comma is blank.
  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

You could use

{ IF "{ MERGEFIELD myfield }" = "" "" ",{ MERGEFIELD myfield }" }

or in Word 2003 and probably 2002 just

{ MERGEFIELD myfield \b , }

should be enough.

You can do the latter by selecting the field and right-clicking, then Edit
Field and fill in the relevant option.

otherwise, use Alt-F9 to view the full field codes, ctrl-F9 to insert each
pair of the special field braces {}, and type the remaining text.

Peter Jamieson
"chartley" wrote in message
...
How do I insert a comma only before a merge field that is populated? In
other words, no comma if the merge field following the comma is blank.



  #3   Report Post  
chartley
 
Posts: n/a
Default

Thank you!

"Peter Jamieson" wrote:

You could use

{ IF "{ MERGEFIELD myfield }" = "" "" ",{ MERGEFIELD myfield }" }

or in Word 2003 and probably 2002 just

{ MERGEFIELD myfield \b , }

should be enough.

You can do the latter by selecting the field and right-clicking, then Edit
Field and fill in the relevant option.

otherwise, use Alt-F9 to view the full field codes, ctrl-F9 to insert each
pair of the special field braces {}, and type the remaining text.

Peter Jamieson
"chartley" wrote in message
...
How do I insert a comma only before a merge field that is populated? In
other words, no comma if the merge field following the comma is blank.




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
currency with auto decimal and comma separator in a table CMD@WTMA Tables 4 June 10th 05 02:27 PM
Why is there a comma in the second line of the mail merge wizard Mandy Mailmerge 1 April 29th 05 07:01 PM
How do I sort a single comma separated list? ge575 Microsoft Word Help 1 February 13th 05 09:54 PM
comma delimited text Karl Mailmerge 2 January 18th 05 03:14 PM
Can I change mail merge lables to delete-exclude the comma ? ... Anne-Louise Mailmerge 1 November 25th 04 02:32 PM


All times are GMT +1. The time now is 08:40 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"