Using QAxObject and Window Com to Handle Word Stupid Problems
-
wrote on 18 Jan 2024, 08:27 last edited by
QAxObject* pWord = new QAxObject("Word.Application", this); if (pWord) { pWord->setProperty("Visible", false); QAxObject* pDocuments = pWord->querySubObject("Documents"); if (pDocuments) }
If you process Word in this way, manage it or set the VS-UAC (requestAdministrator (/level='requireAdministrator ') property, it is highly likely that pDocuments will be null, otherwise it is normal。
I haven't come up with a good solution yet, so I can't use Python。-_ - -
QAxObject* pWord = new QAxObject("Word.Application", this); if (pWord) { pWord->setProperty("Visible", false); QAxObject* pDocuments = pWord->querySubObject("Documents"); if (pDocuments) }
If you process Word in this way, manage it or set the VS-UAC (requestAdministrator (/level='requireAdministrator ') property, it is highly likely that pDocuments will be null, otherwise it is normal。
I haven't come up with a good solution yet, so I can't use Python。-_ -wrote on 18 Jan 2024, 08:43 last edited by@hunter-Li
QAxBase::setControl: requested control Word.Application could not be instantiated
QAxBase::dynamicCallHelper: Object is not initialized, or initialization failed
QAxBase::dynamicCallHelper: Object is not initialized, or initialization failed
Although I know it's a permission issue, is there a better solution?
1/2