-
June 16th, 2015, 04:07 AM
#1
Component Object Model?
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.
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?
2 - Is the COM a sub-part of MFC? Or is it something totally different?
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?
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?
Thanks
Last edited by tomadom; June 16th, 2015 at 05:49 AM.
-
June 16th, 2015, 10:19 AM
#2
Re: Component Object Model?
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.
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.
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.
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.
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.
Last edited by Igor Vartanov; June 16th, 2015 at 10:36 AM.
Best regards,
Igor
-
June 16th, 2015, 04:32 PM
#3
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.
-
June 16th, 2015, 05:29 PM
#4
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.
-
June 17th, 2015, 04:29 AM
#5
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.
Best regards,
Igor
-
June 17th, 2015, 12:35 PM
#6
Re: Component Object Model?
AFAIK, Visual Studio Community is a full featured edition (include ATL, MFC and so on) and free under some conditions.
Last edited by ovidiucucu; June 17th, 2015 at 12:38 PM.
-
June 18th, 2015, 02:23 AM
#7
Re: Component Object Model?
Well then, good news for OP.
Best regards,
Igor
-
June 18th, 2015, 03:33 AM
#8
Re: Component Object Model?
Thanks again everyone. Very helpful posts. This should keep me busy for a while.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|