U
UrbanBlues
Hello
I tried to update Word Custom properties using MFC but got a problem...
Here is the code (simplfied by removing error checking)
CString strFile = "C:\\DataSheet.doc";
WordApp.CreateDispatch( "Word.Application");
WordDocs = WordApp.GetDocuments();
WordDoc = WordDocs.Open( COleVariant( strFile, VT_BSTR), vtOptional,
vtOptional, vtOptional, vtOptional, vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional, vtOptional, vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional);
WordCustProps = WordDoc.GetCustomDocumentProperties();
int nCount = WordCustProps.GetCount();
At this point, a MessageBox appears with the message 'Member not Found' ....
What is strange is that I use the file MSWord.h and MSWord.cpp generated by
VC++ and that the function GetCount is described as member of
CustomProperties ... The code also fails for the other functions ...
Any idea what's wrong with that code ?
Thanks for your help
I tried to update Word Custom properties using MFC but got a problem...
Here is the code (simplfied by removing error checking)
CString strFile = "C:\\DataSheet.doc";
WordApp.CreateDispatch( "Word.Application");
WordDocs = WordApp.GetDocuments();
WordDoc = WordDocs.Open( COleVariant( strFile, VT_BSTR), vtOptional,
vtOptional, vtOptional, vtOptional, vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional, vtOptional, vtOptional, vtOptional, vtOptional,
vtOptional, vtOptional);
WordCustProps = WordDoc.GetCustomDocumentProperties();
int nCount = WordCustProps.GetCount();
At this point, a MessageBox appears with the message 'Member not Found' ....
What is strange is that I use the file MSWord.h and MSWord.cpp generated by
VC++ and that the function GetCount is described as member of
CustomProperties ... The code also fails for the other functions ...
Any idea what's wrong with that code ?
Thanks for your help