VC++ how to get EnhMetaFileBits of every word page
CApplication wordApp;
COleVariant vTrue((short)TRUE), vFalse((short)FALSE), vOpt((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
CDocuments docxs;
CDocument0 docx;
CRange aRange;
CString out_path=_T("C:\\Users\\Administrator\\Desktop\\test\\");
docxs.ReleaseDispatch();
try
{
CoInitialize(NULL);
if(!wordApp.CreateDispatch(_T("Word.Application"),NULL))
{
AfxMessageBox(_T(it cant run")
return ;
}
}
catch(...)
{
return ;
}
docxs=wordApp.get_Documents();
COleVariant vFileName(in_path);
docx=docxs.Open(vFileName,vFalse,vTrue,vFalse,vOpt,vOpt,vOpt,vOpt,vOpt,vOpt,vOpt,vOpt,vOpt,vOpt,vOpt,vOpt);
CWindows win=docx.get_Windows();
CWindow0 window = wordApp.get_ActiveWindow();
CPane0 pane = window.get_ActivePane();
CPages pages = pane.get_Pages();
long index=pages.get_Count();
for(long i=1;i<=index;i++)
{
CPage page=pages.Item(index);(there is a error here,"The requested member of the collection does not exist")
......
}
please help me,thanks in advance.