V
vino
Hi all,
I hope this is the right place for such question:
I have a trouble working with MS Word from C++ (MSVC++ 6.0).
There is a simple task:
1. Open a document,
2. read and change some custom document properties,
3. print the document.
The way that seemed simple to me was use class wizard - automation - new
class - from type library...
This generated some nice wrapper classes which are usable but with no
documentation available at all. (please let me know if I am wrong).
However, someting works but someting doesn't:
_Application objWord;
if (!objWord.CreateDispatch("Word.application", &rError)) {...}
objWord.SetVisible(FALSE);
Documents docs(objWord.GetDocuments());
_Document testDoc;
testDoc.AttachDispatch(docs.Open(...));
// until here it works
LPDISPATCH lpDisp;
long lCount;
lpDisp = testDoc.GetBuiltInDocumentProperties();
CustomProperties rProp(lpDisp);
lCount = rProp.GetCount();
// here the exception - "member not found" is raised
what could be wrong?
thanks,
best regards Vit
I hope this is the right place for such question:
I have a trouble working with MS Word from C++ (MSVC++ 6.0).
There is a simple task:
1. Open a document,
2. read and change some custom document properties,
3. print the document.
The way that seemed simple to me was use class wizard - automation - new
class - from type library...
This generated some nice wrapper classes which are usable but with no
documentation available at all. (please let me know if I am wrong).
However, someting works but someting doesn't:
_Application objWord;
if (!objWord.CreateDispatch("Word.application", &rError)) {...}
objWord.SetVisible(FALSE);
Documents docs(objWord.GetDocuments());
_Document testDoc;
testDoc.AttachDispatch(docs.Open(...));
// until here it works
LPDISPATCH lpDisp;
long lCount;
lpDisp = testDoc.GetBuiltInDocumentProperties();
CustomProperties rProp(lpDisp);
lCount = rProp.GetCount();
// here the exception - "member not found" is raised
what could be wrong?
thanks,
best regards Vit