QAxObject *document = documents->querySubObject("Open(const QString&, bool)", inFile1, true);
QAxObject *selection = axObject.querySubObject("Selection");
...
document->dynamicCall("SaveAs(const QString&)", outFile);
document->dynamicCall("Close()");
I'm not talking about these Qt functions querySubObject, dynamicCall. I'm talking about the Word / ActiveX functions Open, SaveAs, Close ...
I only can glimpse a small part of these functions in some example code fragment. Where can I find the full document?
It seems ms-word functions, but considering Open(const QString&, bool), there's QString, that dispels the idea.
Obviously, the question you linked alredy answers yours but seeing how the accepted answer comes with no explanations at all -> Let us first go through what is missing there, then the correct solution (which the accepted answer is not).
What you need to know is that Qt provides conversion functions (in several files from ActiveQt). Example to illustrate
QString:What matters for
QAxBase::querySubObjectis elsewhere: the pair of functionsQVariantToVARIANTandVARIANTToQVariantmanage the conversion from Qt to ActiveX type and back for all the method's parameters.The correct solution is to use the most voted answer from that same question, that is:
Wordnamespace the same way you would do in VBA.Between the above most voted answer and Qt documentation, it should be clear how much more simple this approach is.