Because installation packages installed by default in the Program File (X86), the test of time Windows 7 installation, use is normal, but because write protected under the win10 added administrator privileges, after in the use of the Word. The Application, when KWPS. Application shows "QAxBase: : setControl: requested the control Word. The Application could not be instantiated"
Void ReportForm: : Open ()
{
//create a new word application
M_pWord=new QAxObject ();
Bool bFlag=m_pWord - & gt; SetControl (" Word. Application ");
if(! BFlag)
{
BFlag=m_pWord - & gt; SetControl (" KWPS. Application ");
if(! BFlag)
return false;
}
M_pWord - & gt; SetProperty (" Visible ", true);
//get all the working document
QAxObject * document=m_pWord - & gt; QuerySubObject (" Documents ");
if(! The document)
{
return false;
}
The document - & gt; DynamicCall (" Add (QString) ", "");
//get the current active document
M_pWorkDocument=m_pWord - & gt; ActiveDocument querySubObject (" ");
}