Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generating word document files from embedded documents in DB.

Status
Not open for further replies.

mz74

Programmer
Aug 4, 2002
17
0
0
GB
My problem is :

I have an Access 2000 DB.
A table contains a field of type "OLE Data".
This field contains Microsoft Word's embedded documents.
What I want is to generate word documents for each of the record programatically in VB. But not succeeded yet.
I also need to do it from SQL Server 7 DB, as I have upsized my Access DB to SQL Server and it is exported in an Image type of field. How can I generate document files from this Access or SQL Server DB.

I tried to achieve it in 2 ways; first I tried:
Created a form, inserted a data control and an OLE control, bound it with the required field. When I run the VB program, it successfully opens the docudments from DB in the control. Then I tried to save the control data using "OLE1.SaveToFile" method to generate a document. It generated a document but unfortunately this document is not in the correct MS Word format so not opening in Word. And secondly I used Getchunk method but the result was same.

I hope you can understand my problem. I need a quick response. Thanks in advance for help.

Zaki
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top