Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I would like to be able to substitue any comma from a {Mergefield field}
result to a return character. Then the Mergefield result "box, top, carrot, onion" would look like box top carrot onion Thank you P. Anderson |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
An additional note to the question, I am using Word 2007 to merge in
document information from ODBC datasource. "P. Anderson" wrote: I would like to be able to substitue any comma from a {Mergefield field} result to a return character. Then the Mergefield result "box, top, carrot, onion" would look like box top carrot onion Thank you P. Anderson |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
1. Ideally, make the substitution in your data source (what is it, and
which version of Word are you using? I ask because it is just possible that you could issuse SQL that would do the appropriate REPLACE, but if for example you data source uses the Jet engine (e.g. is Access or Excel) that won't work. 2. If a. it's always a comma and b. you can guarantee that there are no unhelpful characters (such as ")" ) in the field and c. you can guarantee that the standard list separator in regional options (in control panel) is a comma, then one possibility would be to use a nested EQ field (e.g. { EQ \a({ MERGEFIELD myfield })} (in other words, the string should not contain stuff that the EQ field would misinterpret). Each pair of {} needs to be the special field code braces that you can insert using ctrl-F9 3. Since (2) is probably a tall order, the other "standard" way to do it would be to use VBA and Word's Mailmerge events to replace all the commas by CRLFs and either insert the resulting text directly or use a DOCVARIABLE field to do it. But let us know if you need to do that. Peter Jamieson http://tips.pjmsn.me.uk On 09/04/2010 16:33, P. Anderson wrote: I would like to be able to substitue any comma from a {Mergefield field} result to a return character. Then the Mergefield result "box, top, carrot, onion" would look like box top carrot onion Thank you P. Anderson |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Substitute for Letter Wizard | Microsoft Word Help | |||
QuickParts not a substitute for AutocorrectAutotext | Microsoft Word Help | |||
look at the second character in a mergefield in expressions | Mailmerge | |||
substitute text in header and footer | Microsoft Word Help | |||
I am using an unusual font - how can I set the default substitute. | Microsoft Word Help |