Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

Works in 97 but not in 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Doue - 15 Nov 2005 16:51 GMT
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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.