Re: Component Object Model?
Quote:
Originally Posted by
tomadom
Hi
I'm trying to put together a picture of what it is I have to do to use the Microsoft Component Object Model to automate, create, and manipulate Microsoft word and excel documents.
So far so good.
Quote:
1 - Despite googling this to death I'm not sure about a few things.
To use the Component Object Model do I have to have VC++ installed. I am using a MinGW compiler in CodeBlocks IDE. Can I use and compile COM with this compiler and setup?
COM has nothing to do with VC++. COM standardizes a particular flavor of ABI. Any compiler able to produce the said binary format is going to work for you. More or less painful, which is the real question you are to bother about. For example, Visual Basic or C# or Delphi work like a charm with COM while being definitely not a VC++. And VC++ is definitely not an ideal IDE to deal with heavyweight COM stuff like Word/Excel/PowerPoint. :)
Quote:
2 - Is the COM a sub-part of MFC? Or is it something totally different?
COM itself has nothing to do with MFC. Though MFC provides some level of support in programming COM. Same does ATL.
Quote:
3- Do I download and install COM DLL's or are they already installed as part of the Microsoft office application and windows application installed on my PC?
MS Office products being installed provide COM servers. Refer to documentation for Office products automation.
Quote:
4 - Can I do everything possible with a Word file or Excel file when using the COM?
Would anyone know of any books which explain how to use COM with Microsoft Office Applications?
You can do everything with Word or Excel what MS makes possible with Office Automation interfaces. What part of that suits your needs, or what part you're able to handle, it's all up to you. As for the books, try searching through Amazon for Office Automation. But be prepared for near to zero information regarding how to deal with COM in IDEs other than ones from MS.
Re: Component Object Model?
Thanks for the reply. I think I'm in for allot of work to set this up. There are books on Amazon on COM so I'll try what you've suggested.
Re: Component Object Model?
Search for "excel automation in C++ ATL" or "word automation in C++ ATL"
ATL has a few classes that wrap the com interfaces that are a bit easier to work with than the MFC wrappers, imo.
Re: Component Object Model?
I believe, ATL is supplied as a part of VC++ Professional or higher. Well, AFAIR a couple of years ago ATL 3.0 and MFC 4.2 were included into Platform SDK, but those are really, really outdated.
Re: Component Object Model?
AFAIK, Visual Studio Community is a full featured edition (include ATL, MFC and so on) and free under some conditions.
Re: Component Object Model?
Well then, good news for OP. :)
Re: Component Object Model?
Thanks again everyone. Very helpful posts. This should keep me busy for a while.