Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Can I specify Office version when using QAxObject?
Pauly last edited by
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.
JonB last edited by
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.
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.