Works in 97 but not in 2003

J

John Doue

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
 
J

John Doue

John said:
The following macro works in 97 but not in 2003:


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
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top