Z
zhenjieyu
Hi:
I'm C++ programmer using Words library for MFC , which allow me to display words document in windows application screen. we used "msword.h" and "msword.cpp"
provided by Microsoft before, every thing look fine until new version 2010 was been introduced.
now when we using the function for get document in version 2010, it can't work any more. and idea what should I do to make the program can handle new version word document?
thanks.
peter
COleVariant vOpt(DISP_E_PARAMNOTFOUND, VT_ERROR);
_Application oWordApp;
oWordApp.CreateDispatch(_T("Word.Application"));
if(oWordApp == NULL)
return;
Documents oWordDocs = oWordApp.GetDocuments();
//for Word 2002
_Document oDoc = oWordDocs.Open(COleVariant(sFile), vOpt, vOpt, vOpt, vOpt, vOpt,vOpt, vOpt, vOpt, vOpt, vOpt, vOpt, vOpt, vOpt, vOpt);
I'm C++ programmer using Words library for MFC , which allow me to display words document in windows application screen. we used "msword.h" and "msword.cpp"
provided by Microsoft before, every thing look fine until new version 2010 was been introduced.
now when we using the function for get document in version 2010, it can't work any more. and idea what should I do to make the program can handle new version word document?
thanks.
peter
COleVariant vOpt(DISP_E_PARAMNOTFOUND, VT_ERROR);
_Application oWordApp;
oWordApp.CreateDispatch(_T("Word.Application"));
if(oWordApp == NULL)
return;
Documents oWordDocs = oWordApp.GetDocuments();
//for Word 2002
_Document oDoc = oWordDocs.Open(COleVariant(sFile), vOpt, vOpt, vOpt, vOpt, vOpt,vOpt, vOpt, vOpt, vOpt, vOpt, vOpt, vOpt, vOpt, vOpt);