Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Automating Office

Automating Office

Scheduled Pinned Locked Moved COM
csharpc++visual-studiocomtutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    no_reg_name
    wrote on last edited by
    #1

    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

    S R 2 Replies Last reply
    0
    • N no_reg_name

      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

      S Offline
      S Offline
      sas2222
      wrote on last edited by
      #2

      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

      S N 2 Replies Last reply
      0
      • S sas2222

        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

        S Offline
        S Offline
        sas2222
        wrote on last edited by
        #3

        and try this link to microsoft's docs... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrMicrosoftPowerPoint2000.asp sas

        1 Reply Last reply
        0
        • N no_reg_name

          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

          R Offline
          R Offline
          Rory Solley
          wrote on last edited by
          #4

          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".

          N 1 Reply Last reply
          0
          • R Rory Solley

            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".

            N Offline
            N Offline
            no_reg_name
            wrote on last edited by
            #5

            Yeah, I've seen the chm files, but they cover VB only. It is suprising, the lack of MFC samples. :( Thanks anyway.

            1 Reply Last reply
            0
            • S sas2222

              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

              N Offline
              N Offline
              no_reg_name
              wrote on last edited by
              #6

              Thanks. I'm gonna try this and see how it goes. :)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups