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. C / C++ / MFC
  4. Find the installed version of MS Word

Find the installed version of MS Word

Scheduled Pinned Locked Moved C / C++ / MFC
delphitutorialquestionannouncement
7 Posts 5 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.
  • S Offline
    S Offline
    sashoalm
    wrote on last edited by
    #1

    I have a program that embeds Word through DsoFramer, but I need to know which version (2000/2003/XP/2007/2010) is installed because I need to adjust some things depending on the installed version. Does anyone know how to do that? I have a pointer to the CApplication interface, and I can probably get any interface that's needed.

    There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

    C L C 3 Replies Last reply
    0
    • S sashoalm

      I have a program that embeds Word through DsoFramer, but I need to know which version (2000/2003/XP/2007/2010) is installed because I need to adjust some things depending on the installed version. Does anyone know how to do that? I have a pointer to the CApplication interface, and I can probably get any interface that's needed.

      There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      If you can get the path to Word's executable you might try using GetFileVersionInfo[^], this is just an idea, am not sure if Word's executable(s) actually contain(s) this or not, but you can check.

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <

      1 Reply Last reply
      0
      • S sashoalm

        I have a program that embeds Word through DsoFramer, but I need to know which version (2000/2003/XP/2007/2010) is installed because I need to adjust some things depending on the installed version. Does anyone know how to do that? I have a pointer to the CApplication interface, and I can probably get any interface that's needed.

        There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        I did find an article via Google some time ago which described it, but unfortunately I cannot remember how (maybe "office registry keys" or something). However if you look at a key similar to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Registration\{91130409-6000-11D3-8CFE-0150048383C9} you can find the values. You may need to enumerate some of the keys looking for "Office" etc but it should not be too difficult.

        It's time for a new signature.

        1 Reply Last reply
        0
        • S sashoalm

          I have a program that embeds Word through DsoFramer, but I need to know which version (2000/2003/XP/2007/2010) is installed because I need to adjust some things depending on the installed version. Does anyone know how to do that? I have a pointer to the CApplication interface, and I can probably get any interface that's needed.

          There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

          C Offline
          C Offline
          Cool_Dev
          wrote on last edited by
          #4

          There is 'Version' property on CApplication interface. Moreover, DsoFramer is no longer recommended or supported by Microsoft. It has several known issues with modern office applications.

          enhzflepE S 2 Replies Last reply
          0
          • C Cool_Dev

            There is 'Version' property on CApplication interface. Moreover, DsoFramer is no longer recommended or supported by Microsoft. It has several known issues with modern office applications.

            enhzflepE Offline
            enhzflepE Offline
            enhzflep
            wrote on last edited by
            #5

            Thank-you kindly. The following VBA code gives me word version as being 12 (when using office 2007)

            Sub getWordVer()
            Dim wordApp As Object

            Set wordApp = CreateObject("Word.Application")
            wordApp.Visible = True
            
            wordVer = wordApp.Version
            MsgBox ("Word version: " + Str(wordVer))
            

            End Sub

            modified on Friday, July 16, 2010 4:01 AM

            1 Reply Last reply
            0
            • C Cool_Dev

              There is 'Version' property on CApplication interface. Moreover, DsoFramer is no longer recommended or supported by Microsoft. It has several known issues with modern office applications.

              S Offline
              S Offline
              sashoalm
              wrote on last edited by
              #6

              Thanks, this seems the best solution. Can you tell me what the known issues are? I'd like to know to see if they will affect my project.

              There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

              C 1 Reply Last reply
              0
              • S sashoalm

                Thanks, this seems the best solution. Can you tell me what the known issues are? I'd like to know to see if they will affect my project.

                There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

                C Offline
                C Offline
                Cool_Dev
                wrote on last edited by
                #7

                as you know, DsoFramer appeared in msdn KB articles as a sample of OLE on office applications. Latest office applications are actually not meant to be embedded. DsoFramer was declared as dead and no longer available in msdn samples. One way to embedd office applications is to load them inside web browser control and do some registry modifications to force IE to embedd office applications. Still i think you will be missing some features like ribbon control in Office 2007 and 2010.

                modified on Wednesday, July 21, 2010 10:41 AM

                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