Automating Office
-
I'm trying to automate PowerPoint from an MFC application. When I import office TypeLib (from Add MFC Class from Typelib), VS generates these wrappers for the COM calls. How would one find out what different classes and methods do? Certainly wrappers are not documented in MSDN, and I don't know how to get to the actual COM interfaces being used. btw I'm using VS.NET 2003 and Office 2003
-
I'm trying to automate PowerPoint from an MFC application. When I import office TypeLib (from Add MFC Class from Typelib), VS generates these wrappers for the COM calls. How would one find out what different classes and methods do? Certainly wrappers are not documented in MSDN, and I don't know how to get to the actual COM interfaces being used. btw I'm using VS.NET 2003 and Office 2003
You can use the "OLE/COM Object Viewer" accessible from the Studio .net Tools menu. open up the tool from the "Tools | OLE/COM Object Viewer" menu selection and browse to the Microsoft Powerpoint x.xObject Library in the left hand tree view. the right hand pane should fill up with registration information. doiuble click in the left hand treeview on the power point text and it will open the type library definition (methods, etc..) for the ppt object model. - you can also run Powerpoint and select Tools | Macro | Visual Basic Editor to bring up VBA editor (you must have a presentation open, btw). Then press F2 key to run the object browser which shows all the methods for the powerpoint library and other referenced libraries. -- hope this help.. steve sas
-
You can use the "OLE/COM Object Viewer" accessible from the Studio .net Tools menu. open up the tool from the "Tools | OLE/COM Object Viewer" menu selection and browse to the Microsoft Powerpoint x.xObject Library in the left hand tree view. the right hand pane should fill up with registration information. doiuble click in the left hand treeview on the power point text and it will open the type library definition (methods, etc..) for the ppt object model. - you can also run Powerpoint and select Tools | Macro | Visual Basic Editor to bring up VBA editor (you must have a presentation open, btw). Then press F2 key to run the object browser which shows all the methods for the powerpoint library and other referenced libraries. -- hope this help.. steve sas
and try this link to microsoft's docs... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrMicrosoftPowerPoint2000.asp sas
-
I'm trying to automate PowerPoint from an MFC application. When I import office TypeLib (from Add MFC Class from Typelib), VS generates these wrappers for the COM calls. How would one find out what different classes and methods do? Certainly wrappers are not documented in MSDN, and I don't know how to get to the actual COM interfaces being used. btw I'm using VS.NET 2003 and Office 2003
MS Office actually comes with VB help in the form of .chm files although they are pretty well hidden. The path varies slightly from version to version but if you look around: C:\Program Files\Microsoft Office\Office10\1033 (the 1033 is the important bit), you should see a bunch of .chm files. These will give you information on the various methods. It's not perfect, but it does help. There is quite a bit of KB documentation on MSDN, lookup "Office Automation".
-
MS Office actually comes with VB help in the form of .chm files although they are pretty well hidden. The path varies slightly from version to version but if you look around: C:\Program Files\Microsoft Office\Office10\1033 (the 1033 is the important bit), you should see a bunch of .chm files. These will give you information on the various methods. It's not perfect, but it does help. There is quite a bit of KB documentation on MSDN, lookup "Office Automation".
Yeah, I've seen the chm files, but they cover VB only. It is suprising, the lack of MFC samples. :( Thanks anyway.
-
You can use the "OLE/COM Object Viewer" accessible from the Studio .net Tools menu. open up the tool from the "Tools | OLE/COM Object Viewer" menu selection and browse to the Microsoft Powerpoint x.xObject Library in the left hand tree view. the right hand pane should fill up with registration information. doiuble click in the left hand treeview on the power point text and it will open the type library definition (methods, etc..) for the ppt object model. - you can also run Powerpoint and select Tools | Macro | Visual Basic Editor to bring up VBA editor (you must have a presentation open, btw). Then press F2 key to run the object browser which shows all the methods for the powerpoint library and other referenced libraries. -- hope this help.. steve sas
Thanks. I'm gonna try this and see how it goes. :)