How to read a word document in a C++ programme
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: How to read a word document in a C++ programme

  1. #1
    Join Date
    Oct 2003
    Posts
    71

    How to read a word document in a C++ programme

    How can i read word documents in C++.

  2. #2
    Join Date
    Oct 2003
    Posts
    2
    Code:
    #include "msword8.h"
    ....
    ....
    _Application oWordApp;
    _Document doc;
    Selection oSel;
    
    COleVariant covTrue((short)TRUE), covFalse((short)FALSE), covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR),varpasw;
    if (!oWordApp.CreateDispatch("Word.Application"))
    {
    	AfxMessageBox("Couldn't get Word object.");
    	return;
    }
    Documents docs(oWordApp.GetDocuments());
    doc.AttachDispatch(docs.Add(covOptional,covOptional));
    oSel = oWordApp.GetSelection();
    .....
    ....
    so...  search for "oWordApp GetDocuments" on yandex, altavista  or other search engine

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center