Discussion:
want to change mail merge from all caps to title capitalzed
(too old to reply)
jp
2003-12-10 13:12:14 UTC
Permalink
We are working with a mail merge from our AS/400. We have the data pulled in
but on the 400 input is in all capitials. Is there a way top change the info
from all capitals to normal 'title capitalized'?
Peter Jamieson
2003-12-10 13:45:44 UTC
Permalink
You can use \*Caps, \*Lower, \*FirstCap within each merge field to do fairly
simple capitalization.

However, although \*Caps changes an uppercase string to lowercase except the
initial letters of each Word, \*Firstcap just sets the first letter to upper
case without changing any of the others. So to use FirstCap successfully you
would probably need e.g.

{ QUOTE { MERGEFIELD myfield \*Lower } \*Firstcap }

where all the {} are the special field code braces you can insert using
ctrl-F9.

Alternatively, if the conditions are favourable you may be able to do this
if there are suitable functions that you can use in the SQL query used to
retrieve your data. You would probably have to be getting your data via MS
Query, or writing your own OpenDataSource statements in VBA, or getting your
data via Access. The advantage would be that you didn't have to use these
formatting switches for every merge field. But I don't know whether the
AS400 ODBC driver would let you do that.
--
Peter Jamieson - Word MVP
Post by jp
We are working with a mail merge from our AS/400. We have the data pulled in
but on the 400 input is in all capitials. Is there a way top change the info
from all capitals to normal 'title capitalized'?
jp
2003-12-10 15:02:15 UTC
Permalink
Hi I tried to add the codes but it did not seem to work.. also after the
merge... the field did not show the changes id made..

Here are 2 fields:
«PFRNAM» «PLSNAM»

would you be able to show me how they should look after i add the case
adjustments?

thanks
jp
Post by Peter Jamieson
You can use \*Caps, \*Lower, \*FirstCap within each merge field to do fairly
simple capitalization.
However, although \*Caps changes an uppercase string to lowercase except the
initial letters of each Word, \*Firstcap just sets the first letter to upper
case without changing any of the others. So to use FirstCap successfully you
would probably need e.g.
{ QUOTE { MERGEFIELD myfield \*Lower } \*Firstcap }
where all the {} are the special field code braces you can insert using
ctrl-F9.
Alternatively, if the conditions are favourable you may be able to do this
if there are suitable functions that you can use in the SQL query used to
retrieve your data. You would probably have to be getting your data via MS
Query, or writing your own OpenDataSource statements in VBA, or getting your
data via Access. The advantage would be that you didn't have to use these
formatting switches for every merge field. But I don't know whether the
AS400 ODBC driver would let you do that.
--
Peter Jamieson - Word MVP
Post by jp
We are working with a mail merge from our AS/400. We have the data
pulled
Post by Peter Jamieson
in
Post by jp
but on the 400 input is in all capitials. Is there a way top change the
info
Post by jp
from all capitals to normal 'title capitalized'?
Peter Jamieson
2003-12-10 15:40:26 UTC
Permalink
You have to use Alt-F9 to show the underlying codes. Then you will see e.g.

{ MERGEFIELD PFRNAM } or { MERGEFIELD "PFRNAM" }, and possibly a switch such
as \*Mergeformat.

You then need to change this to

{ MERGEFIELD PRFNAM \*Lower }

(Just type the new text)

Then you need to nest that entire field inside another field, so select the
entire field, and press ctrl-F( to insert a new pair of Field braces. You
should see

{ { MERGEFIELD PRFNAM \*Lower } }

Type QUOTE and a space after the first {
and a space followed by \*FirstCap before the last }
ending up with
{ QUOTE { MERGEFIELD myfield \*Lower } \*Firstcap }

Then select the fields, press F9 to re-execute them, then Alt-F9 to show
"results". You will probably see «Pfrnam» . Then use the ABC button to show
the data from the currently selected record, and fix the other mergefields
using the same approach.


--
Peter Jamieson - Word MVP
Post by jp
Hi I tried to add the codes but it did not seem to work.. also after the
merge... the field did not show the changes id made..
«PFRNAM» «PLSNAM»
would you be able to show me how they should look after i add the case
adjustments?
thanks
jp
Post by Peter Jamieson
You can use \*Caps, \*Lower, \*FirstCap within each merge field to do
fairly
Post by Peter Jamieson
simple capitalization.
However, although \*Caps changes an uppercase string to lowercase except
the
Post by Peter Jamieson
initial letters of each Word, \*Firstcap just sets the first letter to
upper
Post by Peter Jamieson
case without changing any of the others. So to use FirstCap successfully
you
Post by Peter Jamieson
would probably need e.g.
{ QUOTE { MERGEFIELD myfield \*Lower } \*Firstcap }
where all the {} are the special field code braces you can insert using
ctrl-F9.
Alternatively, if the conditions are favourable you may be able to do this
if there are suitable functions that you can use in the SQL query used to
retrieve your data. You would probably have to be getting your data via MS
Query, or writing your own OpenDataSource statements in VBA, or getting
your
Post by Peter Jamieson
data via Access. The advantage would be that you didn't have to use these
formatting switches for every merge field. But I don't know whether the
AS400 ODBC driver would let you do that.
--
Peter Jamieson - Word MVP
Post by jp
We are working with a mail merge from our AS/400. We have the data
pulled
Post by Peter Jamieson
in
Post by jp
but on the 400 input is in all capitials. Is there a way top change the
info
Post by jp
from all capitals to normal 'title capitalized'?
jp
2003-12-10 16:17:16 UTC
Permalink
Thanks i found it.. using rightclick, toggle field codes...
Can i ask you one more question?

We have a field PATSTR this is the patients address, so an example would
be "123 Washiungton St." When i use the «Patst2» with the \*lower
\*Firstcap The field comes up as 123 washington st. This makes sense as
the first value in that field is capitalized... Is there a command that
reads *firstcap of each word in a field? so that it would read '123
Washinton St'




Thanks again for your assistance...
Post by Peter Jamieson
You have to use Alt-F9 to show the underlying codes. Then you will see e.g.
{ MERGEFIELD PFRNAM } or { MERGEFIELD "PFRNAM" }, and possibly a switch such
as \*Mergeformat.
You then need to change this to
{ MERGEFIELD PRFNAM \*Lower }
(Just type the new text)
Then you need to nest that entire field inside another field, so select the
entire field, and press ctrl-F( to insert a new pair of Field braces. You
should see
{ { MERGEFIELD PRFNAM \*Lower } }
Type QUOTE and a space after the first {
and a space followed by \*FirstCap before the last }
ending up with
{ QUOTE { MERGEFIELD myfield \*Lower } \*Firstcap }
Then select the fields, press F9 to re-execute them, then Alt-F9 to show
"results". You will probably see «Pfrnam» . Then use the ABC button to show
the data from the currently selected record, and fix the other mergefields
using the same approach.
--
Peter Jamieson - Word MVP
Post by jp
Hi I tried to add the codes but it did not seem to work.. also after the
merge... the field did not show the changes id made..
«PFRNAM» «PLSNAM»
would you be able to show me how they should look after i add the case
adjustments?
thanks
jp
Post by Peter Jamieson
You can use \*Caps, \*Lower, \*FirstCap within each merge field to do
fairly
Post by Peter Jamieson
simple capitalization.
However, although \*Caps changes an uppercase string to lowercase except
the
Post by Peter Jamieson
initial letters of each Word, \*Firstcap just sets the first letter to
upper
Post by Peter Jamieson
case without changing any of the others. So to use FirstCap successfully
you
Post by Peter Jamieson
would probably need e.g.
{ QUOTE { MERGEFIELD myfield \*Lower } \*Firstcap }
where all the {} are the special field code braces you can insert using
ctrl-F9.
Alternatively, if the conditions are favourable you may be able to do
this
Post by jp
Post by Peter Jamieson
if there are suitable functions that you can use in the SQL query used
to
Post by jp
Post by Peter Jamieson
retrieve your data. You would probably have to be getting your data
via
Post by Peter Jamieson
MS
Post by jp
Post by Peter Jamieson
Query, or writing your own OpenDataSource statements in VBA, or getting
your
Post by Peter Jamieson
data via Access. The advantage would be that you didn't have to use
these
Post by jp
Post by Peter Jamieson
formatting switches for every merge field. But I don't know whether the
AS400 ODBC driver would let you do that.
--
Peter Jamieson - Word MVP
Post by jp
We are working with a mail merge from our AS/400. We have the data
pulled
Post by Peter Jamieson
in
Post by jp
but on the 400 input is in all capitials. Is there a way top change
the
Post by jp
Post by Peter Jamieson
info
Post by jp
from all capitals to normal 'title capitalized'?
Peter Jamieson
2003-12-10 16:42:13 UTC
Permalink
\*Caps

It's all in Word Help under Fields.

--
Peter Jamieson - Word MVP
Post by jp
Thanks i found it.. using rightclick, toggle field codes...
Can i ask you one more question?
We have a field PATSTR this is the patients address, so an example would
be "123 Washiungton St." When i use the «Patst2» with the \*lower
\*Firstcap The field comes up as 123 washington st. This makes sense as
the first value in that field is capitalized... Is there a command that
reads *firstcap of each word in a field? so that it would read '123
Washinton St'
Thanks again for your assistance...
Post by Peter Jamieson
You have to use Alt-F9 to show the underlying codes. Then you will see
e.g.
Post by Peter Jamieson
{ MERGEFIELD PFRNAM } or { MERGEFIELD "PFRNAM" }, and possibly a switch
such
Post by Peter Jamieson
as \*Mergeformat.
You then need to change this to
{ MERGEFIELD PRFNAM \*Lower }
(Just type the new text)
Then you need to nest that entire field inside another field, so select
the
Post by Peter Jamieson
entire field, and press ctrl-F( to insert a new pair of Field braces. You
should see
{ { MERGEFIELD PRFNAM \*Lower } }
Type QUOTE and a space after the first {
and a space followed by \*FirstCap before the last }
ending up with
{ QUOTE { MERGEFIELD myfield \*Lower } \*Firstcap }
Then select the fields, press F9 to re-execute them, then Alt-F9 to show
"results". You will probably see «Pfrnam» . Then use the ABC button to
show
Post by Peter Jamieson
the data from the currently selected record, and fix the other mergefields
using the same approach.
--
Peter Jamieson - Word MVP
Post by jp
Hi I tried to add the codes but it did not seem to work.. also after the
merge... the field did not show the changes id made..
«PFRNAM» «PLSNAM»
would you be able to show me how they should look after i add the case
adjustments?
thanks
jp
Post by Peter Jamieson
You can use \*Caps, \*Lower, \*FirstCap within each merge field to do
fairly
Post by Peter Jamieson
simple capitalization.
However, although \*Caps changes an uppercase string to lowercase
except
Post by Peter Jamieson
Post by jp
the
Post by Peter Jamieson
initial letters of each Word, \*Firstcap just sets the first letter to
upper
Post by Peter Jamieson
case without changing any of the others. So to use FirstCap
successfully
Post by Peter Jamieson
Post by jp
you
Post by Peter Jamieson
would probably need e.g.
{ QUOTE { MERGEFIELD myfield \*Lower } \*Firstcap }
where all the {} are the special field code braces you can insert
using
Post by Peter Jamieson
Post by jp
Post by Peter Jamieson
ctrl-F9.
Alternatively, if the conditions are favourable you may be able to do
this
Post by jp
Post by Peter Jamieson
if there are suitable functions that you can use in the SQL query used
to
Post by jp
Post by Peter Jamieson
retrieve your data. You would probably have to be getting your data
via
Post by Peter Jamieson
MS
Post by jp
Post by Peter Jamieson
Query, or writing your own OpenDataSource statements in VBA, or
getting
Post by Peter Jamieson
Post by jp
your
Post by Peter Jamieson
data via Access. The advantage would be that you didn't have to use
these
Post by jp
Post by Peter Jamieson
formatting switches for every merge field. But I don't know whether
the
Post by Peter Jamieson
Post by jp
Post by Peter Jamieson
AS400 ODBC driver would let you do that.
--
Peter Jamieson - Word MVP
Post by jp
We are working with a mail merge from our AS/400. We have the data
pulled
Post by Peter Jamieson
in
Post by jp
but on the 400 input is in all capitials. Is there a way top change
the
Post by jp
Post by Peter Jamieson
info
Post by jp
from all capitals to normal 'title capitalized'?
Loading...