CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Adding Word97 DOC into MS Access from VB

    Hi,

    Can anyone guide me (with source if possible) how can I add a MS Word 97 document into an Access Database whose field is defined as OLE Object..???

    I need to store the MS Word 97 document into Access and retrieve it for viewing...????

    Thanks,
    SAM.


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Adding Word97 DOC into MS Access from VB

    here is how I do it:
    use the ole control.
    whenever the user applies the Save command, invoke the OLESaveToFile method (or whatever the real syntax is) and cause the OLE control to save the contents of the document to the file.
    Then, read that file and write it to the database using Appendchunk method.

    For reading, reverse that process.
    Read the data using GetChunk and save the binary data to a file.
    Then make the ole control load that file by issues the oleReadFromFile method.


  3. #3
    Join Date
    May 1999
    Posts
    3,332

    Re: Adding Word97 DOC into MS Access from VB

    One more thing. With ADO and VB 6 you might even be able to use the new data bound OLE control.



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