Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM Automation - Class Definiation
Message
 
À
05/02/2005 03:35:50
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00984083
Message ID:
00984231
Vues:
21
>Hi,
>Thank you for reply.
>I know about intellisense feature for COM automation, and it is great!!!
>However, before I can use it, how could I know that "word.application" is the class definition to auotmate MS word? How could I know "excel.application" should used to CREATEOBJECT()?

There are a bunch of those application objects that we can instanciate with VFP . Somewhere they may be a master list. I just learned a "new one" last week.

If your question is: How do I know VFP sucessfully instanciated an application object - one trick is with ON ERROR:
cLastOnError=ON('ERROR')
ON ERROR oExcel=NULL
oExcel=CREATOBJECT("Excel.Application")
if oExcel=NULL
   messagebox("Cannot instanciate Excel")
endif
ON ERROR &lcLastOnError
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform