[windev] ***SPAM*** Word Automation

Thierry Marneffe Thierry.Marneffe at skynet.be
Sat Feb 20 12:48:49 GMT 2010


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 =3D "C:\\DataSheet.doc"; =


    WordApp.CreateDispatch( "Word.Application");

    WordDocs =3D WordApp.GetDocuments();

    WordDoc =3D WordDocs.Open( COleVariant( strFile, VT_BSTR), vtOptional, =
vtOptional, vtOptional, vtOptional, vtOptional, vtOptional, vtOptional, vtO=
ptional, vtOptional, vtOptional, vtOptional, vtOptional, vtOptional, vtOpti=
onal, vtOptional);

    WordCustProps =3D WordDoc.GetCustomDocumentProperties();

    int nCount =3D WordCustProps.GetCount();

At this point, a MessageBox appears with the message 'Member not Found' ...=
. =


Any idea what's wrong with that code ? =


Thansk for your help


Thierry =


EMail: thierry.marneffe at skynet.be =

Web: www.tgmdev.be =

Blog: http://isanakisudoku.blogspot.com/
 Download Isanaki 2.6b at www.tgmdev.be, the latest version of Isanaki Sudo=
ku, a free multilingual Sudoku and Wordoku Generator, Solver and Helper ...
 Download KillProcess 2.0 at www.tgmdev.be, the latest version of KillProce=
ss, a free utilities to kill any Windows XP process or services ...
 Download Horses 2.0 at www.tgmdev.be, the latest version of Horses, a free=
 version of the classical Horses Puzzle... =

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.windev.org/pipermail/windev/attachments/20100220/f524cd0c=
/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 6150 bytes
Desc: not available
Url : http://lists.windev.org/pipermail/windev/attachments/20100220/f524cd0=
c/attachment.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1083 bytes
Desc: not available
Url : http://lists.windev.org/pipermail/windev/attachments/20100220/f524cd0=
c/attachment-0001.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1074 bytes
Desc: not available
Url : http://lists.windev.org/pipermail/windev/attachments/20100220/f524cd0=
c/attachment-0002.gif


More information about the Windev mailing list