automating Word - OLE error - server threw an exception 
Author Message
 automating Word - OLE error - server threw an exception

I have some Visual FoxPro code that automates MSWord.  It
starts a word session, opens a doc, performs bookmark
substitution, prints doc, closes word discarding the
changes.

This works fine with Win98 and Word97.  Now i get the
following using WinXP and WordXP:

"1426 - OLE Error 0x80010105 - The Server threw an
Exception".

It may work the first time and give the error on followup
attempts, or it may fail first time run.  I have turned
OFF the Norton AV "enable office plugin" and have also
disabled "script blocking" but still get the error.



Sat, 30 Oct 2004 04:46:07 GMT  
 automating Word - OLE error - server threw an exception
Two lines of investigation:

1) XP is very susceptible to OLE failures. ( I have a client who switched
back to Win2K because of this issue.) The operating system has become so
complex, it is now *seriously* difficult to get it configured correctly.

2) Word sometimes responds like this to obscure errors in your automation
code. Word's VBA changed significantly between 97 and 2000, so errors that
previously passed unnoticed might now matter. In particular, if you have
unhandled errors in Word (eg, if you use On Error Resume Next), Word remains
silent, but eventually falls over. I had a problem like this that turned out
to be a missing period: inside a With Word.Application .... End With
structure I was calling a word function that took a range argument. The
statement was missing the period in front of the Range keyword. Neither VB
nor Word reported this as an error; but Word threw an exception on exit.


Quote:
> I have some Visual FoxPro code that automates MSWord.  It
> starts a word session, opens a doc, performs bookmark
> substitution, prints doc, closes word discarding the
> changes.

> This works fine with Win98 and Word97.  Now i get the
> following using WinXP and WordXP:

> "1426 - OLE Error 0x80010105 - The Server threw an
> Exception".

> It may work the first time and give the error on followup
> attempts, or it may fail first time run.  I have turned
> OFF the Norton AV "enable office plugin" and have also
> disabled "script blocking" but still get the error.



Sun, 31 Oct 2004 07:45:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Server threw an exception error

2. 80010105 -Automation error The server threw an exception

3. Server.CreateObject throws unknown exception

4. Unhandled Exception Error Unloading OLE Automation Server

5. Error Message: Exception has been thrown by the target of an invocation

6. Error: (Type initializer threw an exception)

7. Throwing exceptions within a form

8. Throwing an Exception

9. Help - throwing an exception.

10. catching a thrown exception.

11. Exception thrown back only when running from Visual Studio IDE

12. How to Throw an exceptions from a DLL to an EXE

 

 
Powered by phpBB® Forum Software