Word Mmerge Field Formating

fatmcgav

Registered User.
Local time
Today, 07:29
Joined
Jul 24, 2003
Messages
32
Hi there,

I'm having some issues formatting a mail merge field in Word 2003.

Using an Excel spreadsheet as datasource. The data in the field in question looks like this:
Code:
633597032004B7
I want just the last 8 characters.
Now i tried using
Code:
{ MERGEFIELD ISAM_ID_633597 \# "x#######" }

However the field then comes out as "97032004" - dropping the B7...

Is there just a universal character option? I've tried replacing with *, @, % and cant get any to work...

Any ideas?

Cheers
Gavin
 
err.. aren't you telling the merge to format to number then adding in a text - ii don't think thats gonna work

(Mind you you just helped me on a different issue )
 
err.. aren't you telling the merge to format to number then adding in a text - ii don't think thats gonna work

(Mind you you just helped me on a different issue )
Yeh, i thought it'd be something like that.

Is there just a character input option?

Cheers
Gav
 
Yeh, i thought it'd be something like that.

Is there just a character input option?

Cheers
Gav

way above my head -- I know the problem - the solution thats a different matter .. (lol) have fun figuring that one out...
regards
 
? is the universal character
Hi there,

Cheers for that info... Does seem to work... just need to work out how to put it together now...

If i try
Code:
\# "x#####??"
, it gives me "032004??" - right length, got ?'s though...

If i try
Code:
\# "x???????"
, it gives me "4???????".

Trying
Code:
\? "x???????"
, it gives me "633597032004B7". Same with "\@"

Any ideas how i need to format it to give me only the last 8 characters?

Cheers
Gavin
 
I dont have much experience in using fields in word, always found them a pain to be honest. Is there anyway you can use the "right" function?
 
I dont have much experience in using fields in word, always found them a pain to be honest. Is there anyway you can use the "right" function?
Right? Dont follow....

Cheers
Gavin
 
There is a VBA string function called "right" which has the format:

right(<string>, <length>)

so

right("1234567890", 8)

would return the string:

"34567890"

Now your not using VBA and I don't know if the function can be used in word fields, having read the help it looks like it can't.
 

Users who are viewing this thread

Back
Top Bottom