Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can I specify Office version when using QAxObject?
Forum Updated to NodeBB v4.3 + New Features

Can I specify Office version when using QAxObject?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 3 Posters 251 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.
  • P Offline
    P Offline
    Pauly
    wrote on last edited by
    #1

    In my application I use QAxObject to interact with excel,

    excel = new QAxObject("Excel.Application");
    

    I have multiple version of office installed, 2013 and 2016. So is there a way to specify which version to use with the QAxObject? Thanks.

    JonBJ 1 Reply Last reply
    0
    • P Pauly

      In my application I use QAxObject to interact with excel,

      excel = new QAxObject("Excel.Application");
      

      I have multiple version of office installed, 2013 and 2016. So is there a way to specify which version to use with the QAxObject? Thanks.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Pauly
      The Windows Registry determines what these Automation Objects map to. You may have some other registry entry like "Excel.Application.13" for running a particular, non-default version.

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #3

        The official word from Microsoft is that you can't choose. This article says that basically the one that was installed last (or run in case of newer versions of Word) is the one chosen. The article also explicitly says that what @JonB suggested won't work so you're out of luck I'm afraid.

        1 Reply Last reply
        3

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved