ken9865432
Thanks for the tip.
I am new to ole/com automation. What I was doing was using visual studio's insert class (class wizard ) to automatically generate class (wrapper ) files. I also figured that there are two ways to do automation. The first way is using #import and other way by using class wizard. I was using class wizard to generate dispatch wrapper or whatever its called.
The class wizard inserted #import statements to the generated excel component file (such as "CApplication.h") but it seems like you have to delete all #import statements when you are using class wizard to do this. I deleted all #import statements and most errors disappeared and the program compiled.
Also vs2005 class wizard has a comfirmed bug that vs.net didnt have. 2005 fails to generate correct class name or somethi g. These inconvinience and differences between vstudio versions really makes things difficult for newbies like me.
Anyway I was able to start an excel application from c++. thats all I am able to do so far. I know that class wizard doesnt do everything for you but I am lacking in knowledge to figure out how to put things correct. Thanks for the help.