Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Claudio Claudio is offline
external usenet poster
 
Posts: 7
Default trim trailing spaces in mergefield

Word 2002
I'm using a Word document containing a table as data source. In the table I
define the mergefields to be used in the Word template. These fields are
filled with data that is always padded with spaces to reach 50 characters in
length. In the merge, I need to insert some of these fields between fixed
text and so I need to remove the unnecessary spaces. Is there a
parameter/option to trim the mergefield?


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default trim trailing spaces in mergefield

Unfortunately assuming that there's nothing you can do about the format
provided to you, the simplest solution to this problem is probably to export
the data from Word into one of the many formats (almost all of them) which
cannot be made to retain trailing spaces.

That said, is there anything you /can/ do about the format provided to you?

Also, are you in a position to use VBA for your merge? If so, you can
consider using Word's MailMerge events to strip trailing spaces, set a
Document variable and use a { DOCVARIABLE } field to insert the result
instead of a { MERGEFIELD } field.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"claudio" wrote in message
...
Word 2002
I'm using a Word document containing a table as data source. In the table
I
define the mergefields to be used in the Word template. These fields are
filled with data that is always padded with spaces to reach 50 characters
in
length. In the merge, I need to insert some of these fields between fixed
text and so I need to remove the unnecessary spaces. Is there a
parameter/option to trim the mergefield?



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
Mergefield Formatting - Trim function? Word 2000 Chris Stammers Mailmerge 5 December 10th 09 10:00 AM
Removing trailing spaces in a table Kamran Microsoft Word Help 6 October 22nd 08 11:17 PM
Trailing spaces in columns Dustin Page Layout 1 August 31st 06 08:05 PM
Underline trailing spaces not staying on V-ger Microsoft Word Help 3 June 29th 05 08:37 PM
Where is the menu option for underling trailing spaces Rich611 Microsoft Word Help 2 December 3rd 04 05:12 PM


All times are GMT +1. The time now is 03:21 AM.

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"