Hey all,
I have recently become interested in trying to automate various MS Office applications using C++... I was writing some macros in Excel to update some databases that I work with, and decided it would be cool if I could sort of wrap the entire process in a C++ application. (This way I could accomplish a variety of other things from the same application. But regardless, the reasons why I want to do this are both practical and for personal satisfaction)
Anyway, this is more of a personal problem/project that I am working on, so there is no pressure ;)
Heres the thing: I have pretty much no experience working with COM objects...So I am taking this rather slowly. First thing I want to do is actually open an instance of Excel via C++.
But just my luck, the documentation on the subject is rather skimpy or out of date, and msdn is cryptic as always (again, I'm am no expert on the subject, so msdn is really no use to me).
Anyway, to the meat of my post. I have two questions for you:
1) The documentation that I did find had some code examples. Almost all the examples indicated I would need to import the MSO.DLL, among others. So I added the import line (note I also copied the mso.dll to the same directory as my program so that I wouldn't have to specify the entire path, and so that if I change machines the application will still have all the necessary dlls and such), but in doing so my compiler spat out massive errors (from just importing the library...) I have no idea what they are caused by... They are clearly connected to the MSO.DLL. Incidentally, I am using Dev-C++, if it makes any difference...
Oh yea, the errors are mostly "stray" errors....e.g. stray '\144' in program (the errors occur in the mso.dll)
2) Does anyone know of any resources that they could point me to for some help? I'm thinking I might need to get a book on the subject, so if anyone knows of any that are particularly good, that would be really great.
Thanks a lot guys!
cheers,
n1337