My database is created on Microsoft SQL server. In this
database word documents have been saved in a Image-column.
Now my question is if it from Powerbuilder somehow is
possible to load these documents from the database into
Microsoft Word and then save them as plain ordinary
Word-documents (docname.doc) in a folder outside the
database.
Any suggestions are welcome.
Cheers
Klaus
On 2 Sep 2004 02:34:06 -0700,
in sybase.public.powerbuilder.general
BLOB b_doc
SELECTBLOB <image column>
INTO :b_doc
FROM table
WHERE id = 1
USING SQLCA;
ole_1.ObjectData = bdoc
OLEobject ole_object
ole_object = CREATE OLEobject
ole_1.Copy()
ls_connect = "word.application.8"
IF ole_object.ConnectToNewObject ( ls_connect ) = 0 THEN
ole_object.documents.add
ole_object.Selection.Paste
ole_object.ActiveDocument.SaveAs ("c:\doc.doc" )
ole_object.quit(0)
ole_object.DisconnectObject ( )
END IF
hope this helps!
hth,
JMR