Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFPCOMM Does not expose events of Word.Application
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
VFPCOMM Does not expose events of Word.Application
Divers
Thread ID:
00672260
Message ID:
00672260
Vues:
40
I am using VFP 6.0 and the VFPCOM.ExportEvents( ) to automate MS Word 2000. When I Export events of the Application object I get no events. If I try it with a Document object I get three events.

* Sample Code
loVfpCom = CREATEOBJECT( 'VfpCom.ComUtil' )
loWord = CREATEOBJECT( 'Word.Application' )
loDoc = loWord.Documents.Add( )
loVfpCom.ExportEvents( loWord, 'Word_Application_Events.prg' )
loVfpCom.ExportEvents( loDoc, 'Word_Document_Events.prg' )

The two file created look like this.
Contents of "Word_Application_Events.prg"

DEFINE CLASS ApplicationEvents AS custom


ENDDEFINE

Contents of "Word_Document_Events.prg"

DEFINE CLASS DocumentEvents AS custom


PROCEDURE New()
* Add user code here
ENDPROC


PROCEDURE Open()
* Add user code here
ENDPROC


PROCEDURE Close()
* Add user code here
ENDPROC


ENDDEFINE

Word documentation states there are many events at the application level, like Quit, DocumentOpen, NewDocument, DocumentChange, DocumentBeforePrint, etc. I really need access to these events.

tia
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform