Blob lbl_ole_data
Ole20.InsertFile( as_filename)
lbl_ole_data = Ole20.objectdata
We have a second application which reads the data from the database into an
OLE control and saves the original data to a file.
Blob lbl_ole_data
Ole20.objectdata = lbl_ole_data
Ole20.Activate(InPlace!) //
this line is for testing only
Ole20.object.SaveAs( ls_tempfilename, AsStatement!)
This technique works fine when the original MS-Word files were created on my
machine or on my colleague's machine. However, if the files were originally
created on one of our customer's machines, PowerBuilder returns the
following error.
"Error calling external object function saveas".
If I add the statement, Ole20.Activate(InPlace!), MS-Word is activated and
opens the document successfully on my machine.
I set breakpoints in both the error event and the ExternalException event of
the OLE control, but only the Error event is triggered.
Does anyone have any idea what might be causing the problem or how to get
more information on what is causing the problem? Is there an alternative
technique that I could use?
Thanks.
Regards,
Leonard Berman