Word Automation Crash (-2147417851) and other strange errors 
Author Message
 Word Automation Crash (-2147417851) and other strange errors

I'm getting some strange errors when automating Word. I'm using VB6,
latest service packs, and I'm automating Word 97, 2000, and XP. I'm
using this type of code:

Public WithEvents oWordApp as Word.Application

Private Sub getApp()
   dim errorCount as integer
   errorCount = 0
   on error goto appError
   ' try to get an existing instance first
   set oWordApp = GetObject(,"Word.Application")

   if errorCount > 0 then
      ' can't get an existing instance, let's try making a new one
      set oWordApp = CreateObject("Word.Application")
   end if

   exit sub

appError:
   ' we assume that the only error is that Word is not currently running
   errorCount = errorCount + 1
   resume next
End Sub

99% of my users have no problems with this code, or the subsequent code
which opens documents and runs macros in them. However, some users are
getting an automation error (-2147417851) - "the server has thrown an
exception" or some such nonsence. This has happened when starting Word,
when opening a document (using oWordApp.Open [documentname]), and when
running the macro.

Now, through experiene I've gotten very good at troubleshooting this
sort of thing, but I'm at a loss here. Word starts for these users, but
my program looses control of it. Sometimes the user has luck if they
leave Word open; or in other words, the "GetObject" call is working but
the "CreateObject" call is not.

To add more confusion to this mix, one user even gets a strange Word
error message: "Cannot load DLL." No other information is provided, and
I'm not about to venture into DLL hell with Word! (FYI this particular
user was using Word 2000 and Windows XP Home.)

I can provide more specifics and even expand upon my code sample if
anyone has any ideas about what's going on here - even if they are wild
ideas. At the very least I just need to KNOW what exactly is wrong, so I
can pass on the information to my users; although I'd like it if there
was something I could do to prevent the error from happening.

My thanks to you all in advance for reading thus far, and my eternal
thanks to anyone who can help!

-Keithius
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+: a? c++(++++)$ UL++++ P+ L+ E W++(+) N+(++) o? K-
w++(+++)(--)$ O M-- V PS+ PE+ Y+ PGP+
t++ 5 X+ R tv b++ DI++(++++) D+ G e* h r++ y+
-----END GEEK CODE BLOCK-----



Tue, 25 Oct 2005 02:24:35 GMT  
 Word Automation Crash (-2147417851) and other strange errors
Hi Keithius,

have you checked how Outlook is being used (as email editor) on these
problem machines? That would be my first thought.

Quote:
> I can provide more specifics and even expand upon my code sample if
> anyone has any ideas about what's going on here - even if they are wild
> ideas. At the very least I just need to KNOW what exactly is wrong, so I
> can pass on the information to my users; although I'd like it if there
> was something I could do to prevent the error from happening.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Tue, 25 Oct 2005 17:35:13 GMT  
 Word Automation Crash (-2147417851) and other strange errors

I'm still checking with one user who was having a problem, I believe he
was not using Word as his Outlook email editor though. (I have another
user who does use Word as his Outlook email editor, and he does not get
the problem.)

In case it matters, I thought there might be a problem with Outlook - I
had the user with the problem shut down Outlook before running my
program; unfortunately the problem still occured.

I will get back to you with a specific answer once I find out whether my
problem user is actually using Outlook as his email editor (although as
I said, I do not think he is).

Thanks!
-Keithius

Quote:

>Hi Keithius,

>have you checked how Outlook is being used (as email editor) on these
>problem machines? That would be my first thought.

>>I can provide more specifics and even expand upon my code sample if
>>anyone has any ideas about what's going on here - even if they are wild
>>ideas. At the very least I just need to KNOW what exactly is wrong, so I
>>can pass on the information to my users; although I'd like it if there
>>was something I could do to prevent the error from happening.

>Cindy Meister
>INTER-Solutions, Switzerland
>http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
>http://www.mvps.org/word

>This reply is posted in the Newsgroup; please post any follow question or
>reply in the newsgroup and not by e-mail :-)

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+: a? c++(++++)$ UL++++ P+ L+ E W+++
N+(++) o? K- w++(+++)(--)$ O M-- V PS+ PE+ Y+
PGP t++ 5 X+ R tv b++ DI++++ D+ G e* h r++ y+
-----END GEEK CODE BLOCK-----


Sat, 29 Oct 2005 00:21:53 GMT  
 Word Automation Crash (-2147417851) and other strange errors
Quote:

>>Hi Keithius,

>>have you checked how Outlook is being used (as email editor) on these
>>problem machines? That would be my first thought.

I've checked with my main problem user - he is not using Word as his
email editor - he is using the standard Outlook editor.

-Keithius

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+: a? c++(++++)$ UL++++ P+ L+ E W+++
N+(++) o? K- w++(+++)(--)$ O M-- V PS+ PE+ Y+
PGP t++ 5 X+ R tv b++ DI++++ D+ G e* h r++ y+
-----END GEEK CODE BLOCK-----



Sat, 29 Oct 2005 01:54:06 GMT  
 Word Automation Crash (-2147417851) and other strange errors
Hi Keithius,

Quote:
> I've checked with my main problem user - he is not using Word as his
> email editor - he is using the standard Outlook editor.

Well, there goes that idea...

Do you know if these users have any problems running macros from within
the Word application environment?

Is your code running across a network connection (IOW you might be
dealing with a hardware problem)?

And you're run Detect and Repair (for Word 2000 and later), or forced
Word to re-register?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)



Sat, 29 Oct 2005 23:55:53 GMT  
 Word Automation Crash (-2147417851) and other strange errors

Quote:

>Do you know if these users have any problems running macros from within
>the Word application environment?

None of the users have problems running macros from within Word itself.
This is part of the frustration factor: when I run my custom macro from
within Word itself (manually supplying the arguments), it works just fine.

Quote:
>Is your code running across a network connection (IOW you might be
>dealing with a hardware problem)?

In some cases, yes, in others, no.

Quote:
>And you're run Detect and Repair (for Word 2000 and later), or forced
>Word to re-register?

I'm afraid so. Detect & Repair did nothing, I even did a complete
un-install (following the directions from the MS Knowledge base on how
to completely remove Word 2000) for one user to no avail. I've used the
Word registration command-line switches without any luck.

The disturbing thing here is that the problem seems to be spreading.
Just today I got a call that another user is getting this problem - and
there seems to be no single catalyst that causes the problem to manifest
itself. What's worse is that I still cannot duplicate this problem on my
computer; which makes troubleshooting it and/or finding a solution even
more maddening.

I appreciate your help with this - I hope we can find an answer soon.

-Keithius

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+: a? c++(++++)$ UL++++ P+ L+ E W+++
N+(++) o? K- w++(+++)(--)$ O M-- V PS+ PE+ Y+
PGP t++ 5 X+ R tv b++ DI++++ D+ G e* h r++ y+
-----END GEEK CODE BLOCK-----



Sat, 05 Nov 2005 02:16:49 GMT  
 Word Automation Crash (-2147417851) and other strange errors
Hi Keithius,

Quote:
> I appreciate your help with this - I hope we can find an answer soon.

I just wish I had more ideas to offer, but I'm afraid I'm all out...
:-(

    Cindy Meister



Sat, 05 Nov 2005 23:35:35 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. rvbrewiz - Run-time error '-2147417851 (80010105)': Automation error

2. Urgent, please help. Automation Error -2147417851

3. error -2147417851

4. signing vba macros in word causes automation errors and crashes

5. automation client error -2147417851, Method '~' of object ~ failed

6. OLE Automation Error Experienced with Word 7.0 not with Word 6.0

7. OLE Automation Error Experienced with Word 7.0 not with Word 6.0

8. OLE Automation Error experienced with Word 7.0 not with Word 6.0

9. Automation Error - Strange

10. Strange Automation Error - remedy required

11. StRaNgEr Automation Error

12. Strange Automation Error -2147417843

 

 
Powered by phpBB® Forum Software