Information générale
Catégorie:
COM/DCOM et OLE Automation
I don't know that the issue is a difference between different versions of Word,
as it may be a Word session already open.
There has not been a problem since I start the Word routine sending the name
of the error handler to to cOldError. Then I use the following:
ON ERROR DO myWordError && identify the Word Error handler
oWord = GetObject("word.application") &&If it is open, I got it. If not,
&&myWordError creates the object
ON ERROR DO cOldError && Return the original error handler
FUNCTION myWordError
oWord = CreateObject("word.application")
>On a computer with Office 97 on it, oWord = CreateObject("word.application") starts an instance of Word and returns an object reference to it. On a new computer with Office 2000, the same code starts an instance of Word but returns OLE error 0x8001010a: "The message filter indicated that the application is busy." After clearing the error message, oWord = GetObject(, "word.application") successfully creates a VFP object reference to the running instance. Is there some difference in how a Word 2000 automation server should be started from VFP, vs. Word 97?
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