Information générale
Catégorie:
COM/DCOM et OLE Automation
Victoria,
>Hi Jon,
>
>Actually the error comes if they need to print that document a second time later in the day. I do not close Word until they exit the system. And I do set visible to .f.
Is the reason you leave Word open until they exit the system so that you do not have to re-create the document again?
If so, why not save the document and kill the instance of Word. If they desire to print the document an additional time, re-instantiate Word, open the document and print it. At app termination, delete the document file.
>
>Since my system has twice the memory as their workstations, I had assumed that it was lack of memory.
>
I cant determine the exact cause of why Word is being terminated(there are many possible causes), but the error you indicated is a result of the OLE server no longer existing when you attempt to manipulate it. It could be one of those "I think I'm a power user when I'm not" users pressing Ctrl+Alt+Del and killing the instance of Word that way. Or it could be the user is opening Word while your app is running and when they close that instance of Word, yours is dying as well.
I wouldnt recommend running an OLE server throughout the entire course of your app, especially not one that is as heavily used as Word. But that's just my $0.02.
Jon
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement