Re: Runtime Error in Word 2003
From: Beth Melton (bmelton_at_NoSpam4Memvps.org)
Date: 02/17/05
- Next message: pen10: "Re: Microsoft Word"
- Previous message: TODDEXART: "Re: 'FILE', 'SAVE AS' PLACES AN APOSTROPHE IN THE STRING."
- In reply to: Misha: "Runtime Error in Word 2003"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Feb 2005 13:06:40 -0600
Do you really *need* the macro? Did you create it?
It's finding all occurrences of two paragraph marks in sequence and
replacing with one.
I don't why it is necessary to run when Word starts considering you
typically start with a blank document anyway....
-- Please post all follow-up questions to the newsgroup. Requests for assistance by email can not be acknowledged. ~~~~~~~~~~~~~~~ Beth Melton Microsoft Office MVP Word FAQ: http://mvps.org/word TechTrax eZine: http://mousetrax.com/techtrax/ MVP FAQ site: http://mvps.org/ "Misha" <Misha@discussions.microsoft.com> wrote in message news:62A0F324-6459-4B28-8647-8F43F13010C8@microsoft.com... > When I open Word 2003 I get this message: > Runtime error'91' > Object Variable or With Block variable not set > When I press Debug, this is the macro which is giving trouble: > Sub MAIN() > ' > ' AutoExec.MAIN Macro > ' Executes when Word for Windows is loaded. > ' > Selection.Find.ClearFormatting > Selection.Find.Replacement.ClearFormatting > With Selection.Find.Replacement.ParagraphFormat > .SpaceAfter = 12 > End With > With Selection.Find > .Text = "^p^p" > .Replacement.Text = " ^p" > .Forward = True > .Wrap = wdFindAsk > .Format = True > .MatchCase = False > .MatchWholeWord = False > .MatchWildcards = False > .MatchSoundsLike = False > .MatchAllWordForms = False > End With > Selection.Find.Execute Replace:=wdReplaceAll > > End Sub > > The first line, Selection.Find.ClearFormatting, is highligted in > yellow. > This started happening only this morning. I am not familiar with the > macro > language and have no idea how to fix it. Help, please! > Thanks
- Next message: pen10: "Re: Microsoft Word"
- Previous message: TODDEXART: "Re: 'FILE', 'SAVE AS' PLACES AN APOSTROPHE IN THE STRING."
- In reply to: Misha: "Runtime Error in Word 2003"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|