>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