Re: Using Macro to Change case of text in merge by Doug
Doug
Fri Feb 29 02:42:26 PST 2008
I think that you are going to have to run a macro over the document created
by executing the merge to a new document. Here is the code that you would
use:
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findText:="[A-Z]{2,}", Forward:=True, _
MatchWildcards:=True, MatchCase:=True, Wrap:=wdFindStop) = True
Found = True
Selection.Range.Case = wdTitleWord
Selection.Collapse wdCollapseEnd
Loop
End With
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"jonno" <jon@jordon.co.uk> wrote in message
news:4ed414a5-15a4-450a-ba47-46f5b76aa398@b1g2000hsg.googlegroups.com...
> I'm trying to run a merge from Goldmine to word 2003, however the
> fields I'm bringing in are all in UPPERCASE, is it possible to run a
> macro that changes the fields to title case?
>
> The fields look like:
> {DDEAUTO GoldMine Data &Company \*CHARFORMAT }
>
> I've tried the usual right click "edit field" and change the case in
> the properties dialogue - but it isn't listed as an option.. Any help
> appreciated.
>
> Thanks,
>
> Jon