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 / March 2006

Tip: Looking for answers? Try searching our database.

Runtime Error 91

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Bennett - 06 Mar 2006 23:21 GMT
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?
Word Heretic - 07 Mar 2006 15:03 GMT
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:
[quoted text clipped - 14 lines]
>I have not been able to trace through but could this result simply because
>the Student edition is being used?
John Bennett - 07 Mar 2006 22:28 GMT
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.

> G'day John Bennett <JohnBennett@discussions.microsoft.com>,
>
[quoted text clipped - 27 lines]
> >I have not been able to trace through but could this result simply because
> >the Student edition is being used?
Word Heretic - 08 Mar 2006 09:11 GMT
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
[quoted text clipped - 32 lines]
>> >I have not been able to trace through but could this result simply because
>> >the Student edition is being used?
John Bennett - 08 Mar 2006 19:38 GMT
Not yet.  I did confirm that Word.Application appears to be correct in his
registry HKEY_CLASSES_ROOT.  But this may not mean that all is okay.  

I also noted that he is running Norton NAV and script blocker has attached
itself to Word.  But he disabled script blocker and the problem remained.

> G'day John Bennett <JohnBennett@discussions.microsoft.com>,
>
[quoted text clipped - 45 lines]
> >> >I have not been able to trace through but could this result simply because
> >> >the Student edition is being used?
John Bennett - 09 Mar 2006 17:09 GMT
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.

> G'day John Bennett <JohnBennett@discussions.microsoft.com>,
>
[quoted text clipped - 45 lines]
> >> >I have not been able to trace through but could this result simply because
> >> >the Student edition is being used?
 
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.