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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preview the content in Richtextbox

Status
Not open for further replies.

Johnweida

MIS
Apr 29, 2003
91
CN
Hi,
Is there a better way to preview the content in a richtextbox before printing ?

John Satellite
 
Your question is somewhat unclear, John. "Better way to preview the content" suggests that "common way to preview the content" exists.

Could you please elaborate on what content and what common way of previewing you mean?

Regards,

Ilya
 
If it is an actual Microsoft Word RTF document, you can create a temporary cursor with a general field, put the document in the general field using APPEND GENERAL, and on your report use a oleboundcontrol to show the document.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Another way to preview an RTF or Word doc is to add an ActiveX control to a form, select 'Create from file' and check the 'Link' option.

Find the required file and then 'Save as Class' the ActiveX control with the name of 'oleDocument' to a class library.

In some suitable event/method on your form put :

WITH THISFORM
[tab].AddObject([oleDocument],[oleDocument])
[tab].oleDocument.DoVerb()
[tab].RemoveObject([oleDocument])
ENDW

Bingo - a Word/RTF viewer! [dazed]

FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top