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. Office12 COM addin question

Office12 COM addin question

Scheduled Pinned Locked Moved COM
questioncom
4 Posts 2 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.
  • M Offline
    M Offline
    MumbleB
    wrote on last edited by
    #1

    Hi Guys. My first post in this forumn so please bare with me. I have built an app that references office 12 because I have Office 2007 installed on my PC. However, when I build the exe and install this on another machine it doesn want to work. Is it because the other machine has office 2003 installed on it? Is there an easy way for me to get around this other than having to uninstall Office 2007 from my machine and installing Office 2003 so I can reference the correct com file and build the project with it??

    Excellence is doing ordinary things extraordinarily well.

    B 1 Reply Last reply
    0
    • M MumbleB

      Hi Guys. My first post in this forumn so please bare with me. I have built an app that references office 12 because I have Office 2007 installed on my PC. However, when I build the exe and install this on another machine it doesn want to work. Is it because the other machine has office 2003 installed on it? Is there an easy way for me to get around this other than having to uninstall Office 2007 from my machine and installing Office 2003 so I can reference the correct com file and build the project with it??

      Excellence is doing ordinary things extraordinarily well.

      B Offline
      B Offline
      Baltoro
      wrote on last edited by
      #2

      The simplest and most obvious solution is to write a function that determines what version of Office is installed on the LOCAL MACHINE, and then references the existing library component based on that condition.

      M 1 Reply Last reply
      0
      • B Baltoro

        The simplest and most obvious solution is to write a function that determines what version of Office is installed on the LOCAL MACHINE, and then references the existing library component based on that condition.

        M Offline
        M Offline
        MumbleB
        wrote on last edited by
        #3

        Thanks for the reply Baltoro but I have no idea how to do this. Do you know of any posts that shows how to do this? I'm just on Google and can't find anything or I might be searching for the wrong thing. :doh:

        Excellence is doing ordinary things extraordinarily well.

        B 1 Reply Last reply
        0
        • M MumbleB

          Thanks for the reply Baltoro but I have no idea how to do this. Do you know of any posts that shows how to do this? I'm just on Google and can't find anything or I might be searching for the wrong thing. :doh:

          Excellence is doing ordinary things extraordinarily well.

          B Offline
          B Offline
          Baltoro
          wrote on last edited by
          #4

          All COM classes have registry entries (this is what the COM Library uses to activate objects). Searching the registry is pretty simple. As I recall, Microsoft applications have thousands of registry keys and values. I would guess enumerating, HKEY_LOCAL_MACHINE\SOFTWARE subkeys for Microsoft subkey, and then specific subkeys for Office 12, and eventually, you're looking for a Current Version subkey and value. Also, you might try searching here: Object Library Reference for Microsoft Office 12[^]

          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