I have a MS word document which contains words and images. I just want to display the whole document on popup PB window for user to read it. I created the window and RichText datawindow with one column as String with length 100 (it does not have Blob type on RichText data window) , and property is "display only". On the open event of window , I put the code as :
nteger rtn
rtn = dw_1.InsertDocument("c:\Documents\Richtextfile.doc", &
false, FileTypeDoc!)
When I ran it, nothing displays on Datawindow. Are there any ideas why the document did not show on data window. Thank you.
From the IDE you can load a docx to a richtext datawindow control...
Of course, Kelvin doesn't mention what version of Powerbuilder is he using...
Andreas.
FileTypeRichText! – (Default) The file being opened is in rich text format (RTF).
FileTypeText! – The file being opened is plain ASCII text (TXT).
FileTypeHTML! – The file being opened is in HTML format (HTM or HTML)
FileTypeDoc! – The file being opened is in Microsoft Word format (DOC)
The FileTypeDoc! argument refers to the old W95 MS-Word format (aka a .DOC file). The newer .DOCX format is not yet supported. So you would need to have the MS-Word software re-save the DOCX file as either a .DOC or .RTF file. Then use the InsertDocument() command into either the RTE control or an RTF based DWO.
HTH
Regards ... Chris