Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error accessing external object property SaveDocument

599 views
Skip to first unread message

rcha...@yahoo.com

unread,
Feb 9, 2005, 11:09:31 AM2/9/05
to
Hi,

I am getting "Error accessing external object property
SaveDocument" error when I try to save the data from
RichText presentation style DataWIndow to A123.RTF file.

The code looks like below.

integer li_rtn, Net

li_rtn = rte_1.object.SaveDocument("C:\Program
Files\TPSSRC\wo_XP\111.RTF", FileTypeRichText!)

Net = MessageBox("Result","The specified file already
exists. " + &
"Do you want to overwrite it?" , Exclamation!, YesNo!, 2)

IF Net = 1 THEN
RETURN 0
ELSE
RETURN -1
END IF

Any help will be appreciated.

Thanks,
Ravi.

Alex Whitney

unread,
Feb 9, 2005, 3:46:10 PM2/9/05
to
Remove the 'object' reference from your statement. I am assuming that this
is standard PB RTE control and not some third part OCX.

li_rtn = rte_1.SaveDocument("C:\Program Files\TPSSRC\wo_XP\111.RTF",
FileTypeRichText!)

Alex

<rcha...@yahoo.com> wrote in message
news:420a35b5.548...@sybase.com...

rchamarti

unread,
Feb 9, 2005, 5:57:54 PM2/9/05
to
Hi Alex,

I this scripr in Command button. If i remove the 'object'
from the script, it is giving me"Error:C0051:Unknown
function Name:SaveDocument" error.

I am using PB 8.0.1 Build 8004.
Thanks,
Ravi.

Alex Whitney

unread,
Feb 9, 2005, 6:52:00 PM2/9/05
to
What type of control is rte_1? Is it the standard PB RichTextEdit control or
something else?


Alex
<rchamarti> wrote in message news:420a9572.fe...@sybase.com...

rchamarti

unread,
Feb 10, 2005, 9:44:12 AM2/10/05
to
Alex,

The rte_1 is DataWIndow with RichText presentation style
and Data Source for this DataWindow is External.

The rte_1 is pulling the correct data from A123.RTF file and
displaying data in rte_1 control. But when I try to save the
modified data into a A123.RTF file it is giving me this

Alex Whitney

unread,
Feb 10, 2005, 3:26:22 PM2/10/05
to
It does not appear that there is a native savedocument function for the RTF
datawindow.

You could use selecttextall and then CopyRTFto get the RTF string which you
could then write to disk.
string ls_richtext
dw_1.SelectTextAll()
ls_richtext = dw_1.CopyRTF()

Alex


<rchamarti> wrote in message news:420b7335.631...@sybase.com...

0 new messages