CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2003
    Posts
    16

    Reading word file in vc

    Hi all,

    In my vc program i need to read word files. In codeguru database section i found a no of article on how to read data from excel file. But there is nothing relateted to word file. can anybody help me out.

    Note:

    The word file names are not fixed, it will be provided during runtime.
    Files can be of any size.
    The program must not do any truncation on data.

    Thanks,
    rdonline1
    Last edited by rdonline1; June 6th, 2003 at 05:35 AM.

  2. #2
    Join Date
    Apr 2003
    Location
    Sydney, Australia
    Posts
    38
    Hi Rdonline

    You can manipulate Word docs using COM. Yoou will need to import the appropriate type lib.

    Have a look at:

    http://support.microsoft.com/default...NoWebContent=1

  3. #3
    Join Date
    Jun 2003
    Posts
    16
    like doesn't help much. i need some short of code snippet which wull guid me. there is nothing that short. somebody pl help

  4. #4
    Join Date
    Apr 2002
    Location
    Michigan, USA
    Posts
    869
    There are tutorial examples on how to automate word if you click on the links in the article above or this link.

    http://msdn.microsoft.com/library/de...sofficedev.asp

    for a short example see this thread

    http://www.codeguru.com/forum/showth...+or+automation

    a small example project is attached to the thread.
    Last edited by Tom Frohman; June 10th, 2003 at 06:53 AM.
    Verere testudinem! (Fear the turtle)

    Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy. -Albert Einstein

    Robots are trying to steal my luggage.

  5. #5
    Join Date
    Jun 2003
    Posts
    16
    thanks tom,

    i find the articles are interesting, But they all are related to office automation. How to create and write in word and other files. The process is also too big.

    I just want some simple process to read data. In the examples it takes to much time to instanciate the word and excel applicaton. Is there is no other way just to read from word. For excel i found one very good example but not for word. Can anybody help?

    Thanks

  6. #6
    Join Date
    Apr 2003
    Location
    Sydney, Australia
    Posts
    38
    If you really want to decode a Word file by hand, http://www.wotsit.org/ has all the information on how to do it. But it is not for the faint-hearted - it is a hugely complex format.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured