General information
Category:
COM/DCOM and OLE Automation
Hi Victoria,
>I have a Fox system that uses Word 2000 as an OLE object. I only opne Word when I know that the user needs to print a specific document, but once Word is open, I leave it open until the user leaves the system.
>
>Code to open Word
> public oleApp
> oleApp = CreateObject("Word.Application")
> oleApp.Visible = .f.
> glWordOpen = .t. && created earlier and left as .f.
>
>On occassion and only toward the end of the business day, a user will get an error
>
>#1426 - OLE error code 0x800706ba: The RPC server is unavailable.
>
I assume you are receiving this error when you attempt to kill the instance of Word, ie. oleApp.Quit() generates this error. More than likely, the user is closing the instance of Word manually prior to exiting your application. You can remedy this by not making Word visible to the user, unless your app requires some user intervention in Word. If it does, then prior to attempting to kill the instance of Word, trap for the error.
For instance,
On Error glWordOpen = .f.
oleApp.Quit() && would generate this error if Word is already closed
release oleApp
HTH,
Jon
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only