fatmcgav
02-14-2008, 01:08 AM
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:
633597032004B7
I want just the last 8 characters.
Now i tried using
{ 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
GaryPanic
02-14-2008, 01:57 AM
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 )
fatmcgav
02-14-2008, 02:02 AM
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
GaryPanic
02-14-2008, 02:03 AM
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
fatmcgav
02-14-2008, 02:05 AM
way above my head -- I know the problem - the solution thats a different matter .. (lol) have fun figuring that one out...
regards
Ok.
Anyone else?
Cheers
Gavin
chergh
02-15-2008, 01:04 AM
? is the universal character
fatmcgav
02-15-2008, 01:14 AM
? 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 \# "x#####??", it gives me "032004??" - right length, got ?'s though...
If i try \# "x???????", it gives me "4???????".
Trying \? "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
chergh
02-15-2008, 01:25 AM
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?
fatmcgav
02-15-2008, 01:28 AM
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
chergh
02-15-2008, 01:36 AM
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.