Re: Runtime Error 91 by JohnBennett
JohnBennett
Thu Mar 09 11:09:33 CST 2006
Found the problem and a solution in my situation. The problem PC had Norton
script blocker attached to Word. While this could be removed from the
registry entry this seems like a bad idea as long as Norton is installed.
But changing the CreateObject to:
Set SpellCheck = CreateObject("Word.Application", "localhost")
has resolved the issue.
No side effects in my situation as I am only using the spell check function
of MS Word.
"Word Heretic" wrote:
> G'day John Bennett <JohnBennett@discussions.microsoft.com>,
>
> hmm, i wonder if said student has been a bit dodgy with his install
> and if the word.application has been defined. have you asked him to
> delete the installation and re-install?
>
>
> Steve Hudson - Word Heretic
>
> steve from wordheretic.com (Email replies require payment)
> Without prejudice
>
>
> John Bennett reckoned:
>
> >The error 91 occurs because the On Error rouine gets control and does .Quit
> >to close things down. But the error handler gets control because the
> >CreateObject("Word.Application") is failing on the Student Edition. But I
> >am not sure why.
> >
> >"Word Heretic" wrote:
> >
> >> G'day John Bennett <JohnBennett@discussions.microsoft.com>,
> >>
> >> AFAIK the student edition is identical, just the purchaser has signed
> >> off to their student status and thus qualifies for a discount. I could
> >> be wrong though.
> >>
> >>
> >> Steve Hudson - Word Heretic
> >>
> >> steve from wordheretic.com (Email replies require payment)
> >> Without prejudice
> >>
> >>
> >> John Bennett reckoned:
> >>
> >> >I have a VB6 appplictaion that includes the following to do a spell check
> >> >using Word:
> >> >
> >> >Dim SpellCheck As Object
> >> >
> >> >Set SpellCheck = CreateObject("Word.Application")
> >> >SpellCheck.Visible = False
> >> >SpellCheck.Documents.add
> >> >SpellCheck.ActiveDocument.Select
> >> >SpellCheck.ActiveDocument.CheckSpelling
> >> >
> >> >When I run using with Office Professional Word 2003 SP2 all works fine.
> >> >
> >> >But I have someone who runs using the Student Edition of Word 2003 SP2 and
> >> >they always get runtime error 91 object not set error.
> >> >
> >> >I have not been able to trace through but could this result simply because
> >> >the Student edition is being used?
> >> >
> >> >
> >> >
> >>
> >>
>
>