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
Divers
Thread ID:
00672260
Message ID:
00672870
Vues:
13
>>Try ApplicationEvents2. That's what the Object Browser shows having all the methods.
>
>How can I expose ApplicationEvents2?
>
>CREATEOBJECT( 'Word.ApplicationEvents2' ) Reports "Class Definition for "WORD.APPLICATIONEVENTS2" not found.
>
>Referencing Obj.ApplicationEvent2 to on a valid Word Application object returns an OLE error "Unknown name"
>
>tia.

According to what Della wrote in AutoFox, you should be able to do it like this:

oVFPCOM = CreateObject("vfpcom.comutil")
oWord = CreateObject("Word.Application")
oVFPCOM.ExportEvents(oWord, "WordEvents.PRG")

and the generated program should have the ApplicationEvents2 interface.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform