Two broken code below
Void CWord_Test4Dlg: : OnButton1 ()
{
//TODO: Add your the control notification handler code here
ODocs. ReleaseDispatch ();//
OWordApp. M_bAutoRelease=true;
OWordApp. SetVisible (TRUE);//make visible
OWordApp. Activate ();//activate
ODocs=oWordApp. GetDocuments ();//get the documents object
BeginWaitCursor ();
ODocs=oWordApp. GetDocuments ();
COleVariant vOpt (DISP_E_PARAMNOTFOUND VT_ERROR);
ODoc=oDocs. Add (vOpt vOpt, vOpt, vOpt);//add a new document
Pagesetup=oDoc. GetPageSetup ();
Pagesetup. SetOrientation (0);//longitudinal
.
}
Void CWord_Test4Dlg: : OnButton2 ()
{
//TODO: Add your the control notification handler code here
.
//release, disconnect
The font. ReleaseDispatch ();
Cells. ReleaseDispatch ();
//wordShading ReleaseDispatch ();
Table. ReleaseDispatch ();
Tables. ReleaseDispatch ();
Range. ReleaseDispatch ();
//wordSelection ReleaseDispatch ();
ODoc. RecheckSmartTags ();
ODocs. ReleaseDispatch ();
OWordApp. ReleaseDispatch ();
}
The question now is, if the generated time, save a no fault; Have been generated without fault, but click save, the more points generated will prompt "base class application has stopped working,"
Me, did I start missing, or shut down, which want to change the words, the code could not probe into, also hope more directions!!!!! thank you
CodePudding user response:
Which master to give directions, thank the