Home > Software engineering >  About Qt programming dynamicCall Word and Word InsertFile operation function
About Qt programming dynamicCall Word and Word InsertFile operation function

Time:09-20

Now want to realize the function is the multiple (20 +) doc document in order to add to the end of the output document, refer to the official documentation Range. The InsertFile method (Word) after fully conform to the requirements of the vb statement
The ActiveDocument. Range. The Collapse Direction: wdCollapseEnd=
ActiveDocument. Range. InsertFile FileName:="C: \ TEST. DOC", Link:=True
But my code in qt environment
QAxObject * file=m_pWord - & gt; QuerySubObject (" Selection ");
File - & gt; DynamicCall (" Collapse (int) ", 1);
File - & gt; DynamicCall (" InsertFile (const QString&) ", sFile);
Can run but can't locate the document at the end of the
Beginners, seemingly to online, thank you,

CodePudding user response:

PWord don't know what is, and is ActiveDocument Range why this name?
Assumption is Range, then why get Selection attributes? You don't have a place in post vb code has a Selection,
  • Related