Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Mark1110 Mark1110 is offline
external usenet poster
 
Posts: 2
Default Determine Length Of Mail Merge Field

Hi,

I have a mail merge document that gets its information from an excel file.
Is there a function in word that will give me the length of the one of the
fields, i.e. mm_name? If not, is there a way to treat a phone number (555)
555-1212 as one word so the (555) is not on one line and 555-1212 on another.
The user won't delete the space between after the ) or will the user start
the phone number on a separate line.

I am currently adding spaces before the phone number and if the mm_name is
under 12 characters the letter looks okay, however if it is over 12
characters you something like this:

Jonathon Longname (555) 555-1212.

If not, is there a way when the letter is printed to delete all instances of
spaces that 2 or greater and just make them one space?

Here is the statement I tried but with no luck:

IF {len({MERGEFIELD FullName}+ {MERGEFIELD FirstName}) 10 AND
len({MERGEFIELD FullName}+ {MERGEFIELD FirstName}) 19 SPACE(19 -
len({MERGEFIELD FullName}+ {MERGEFIELD FirstName})}

I have never tried this in a word document. Am I using the correct syntax?


Thanks,

Mark
 
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
Merge Field varies in length nancyc Mailmerge 3 February 3rd 10 05:27 PM
set length of a mail merge field lborshard Mailmerge 2 February 12th 07 08:39 PM
Merge field length limitation Reggie Microsoft Word Help 1 December 4th 06 12:08 PM
can you limit the length of a mail merge field? d warren Mailmerge 1 January 6th 06 04:52 PM
determine label sheet used in mail merge MattinPhx Mailmerge 1 November 5th 05 06:16 AM


All times are GMT +1. The time now is 12:22 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"