Click to See Complete Forum and Search --> : Adding Word97 DOC into MS Access from VB


July 27th, 1999, 08:56 AM
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.

Lothar Haensler
July 27th, 1999, 10:14 AM
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.

Lothar Haensler
July 27th, 1999, 10:16 AM
One more thing. With ADO and VB 6 you might even be able to use the new data bound OLE control.