my_app
= new QAxObject("Word.Application",
this);
QAxObject* my_docs
= my_app
->querySubObject
("Documents");
//Open docxFile
QAxObject* doc
= my_docs
->querySubObject
("Open(const QVariant&, const QVariant&,const QVariant&, const QVariant&, const QVariant&, const QVariant&,const QVariant&)", filename, confirmconversions, readonly, addtorecentfiles, passworddocument, passwordtemplate, revert
);
//Pull out active document object
QAxObject* active_doc
= my_app
->querySubObject
("ActiveDocument");
my_app = new QAxObject("Word.Application", this);
QAxObject* my_docs = my_app->querySubObject("Documents");
//Open docxFile
QString filename(docxFile);
QVariant confirmconversions(false);
QVariant readonly(false);
QVariant addtorecentfiles(false);
QVariant passworddocument("");
QVariant passwordtemplate("");
QVariant revert(false);
QAxObject* doc = my_docs->querySubObject("Open(const QVariant&, const QVariant&,const QVariant&, const QVariant&, const QVariant&, const QVariant&,const QVariant&)", filename, confirmconversions, readonly, addtorecentfiles, passworddocument, passwordtemplate, revert);
//Pull out active document object
QAxObject* active_doc = my_app->querySubObject("ActiveDocument");
To copy to clipboard, switch view to plain text mode
Bookmarks