The following macro works in 97 but not in 2003:
> Sub QuotesWf()
>
> ' QuotesWf Macro
> ' Macro recorded 08/14/02 by John Doue
>
> Selection.Find.ClearFormatting
> Selection.Find.Replacement.ClearFormatting
> With Selection.Find
> .Text = "^0147^0148<"
> .Replacement.Text = "^0171 "
> .Forward = True
> .Wrap = wdFindContinue
> .Format = False
> .MatchCase = False
> .MatchWholeWord = False
> .MatchWildcards = True
> .MatchSoundsLike = False
> .MatchAllWordForms = False
> End With
> Selection.Find.Execute Replace:=wdReplaceAll
> With Selection.Find
> .Text = ">^0147^0148"
> .Replacement.Text = " ^0187"
> .Forward = True
> .Wrap = wdFindContinue
> .Format = False
> .MatchCase = False
> .MatchWholeWord = False
> .MatchWildcards = True
> .MatchSoundsLike = False
> .MatchAllWordForms = False
> End With
> Selection.Find.Execute Replace:=wdReplaceAll
> End Sub
It replaces instances of open-close curly quotes by the appropriate
quote in French text (my TA software goofs here and I end-up, instead of
an open-quote French character at the beginning of a quote, with
open-close English curly characters).
Any idea how to solve the problem?
Thanks

Signature
John Doue
John Doue - 16 Nov 2005 12:37 GMT
> The following macro works in 97 but not in 2003:
>
[quoted text clipped - 41 lines]
>
> Thanks
I am answering my own post because I finally found the explanation: Word
03 does not handle the "autoformat as you type" option the same way as
Word 97 in a macro. Disabling the option for smarquotes at the beginning
of the macro and returning to its original state at the end does the trick.

Signature
John Doue