Qt ActiveX retrieving the number of pages in a word document
musimbate last edited by
I am not proficient at VBA but need to use the documentation from "microsoft":http://msdn.microsoft.com/en-us/library/office/ff839342.aspx the documentation form msdn] to retrieve the number of pages in a word document.I have tried things like in the snippet below:
QAxObject* selection = mWordDoc->querySubObject( "Selection" ); QAxObject* pageNumbers = selection ->querySubObject( "PageNumbers" ); int numberOfPages = pageNumbers->property("Count").toInt();
But I am getting errors like
- QAxBase::dynamicCallHelper: PageNumbers: No such property in d:\gakwandi.docx [unknown] Candidates are:....*.
which suggests that I am somehow getting the syntax wrong somewhere.I was hopping someone more experienced with this would hep point out what I might be doing wrong.