RTF preview and RTF save of generated document.
Posted on 2000-04-10
I have defined simple language to allow users to create simple letters and then print them out.
A sample program is shown below.
PRINT "Dear Mr. "
SETFONT "COURIER NORMAL"
PRINT "You owe us $"
During Interpretation i simplly use appropriate printer/word/SQL SELECT commands to format the text ....
Dear Mr. John
You owe us $100
This program is stored in SQL SERVER and whenever a letter is to be printed the program is retrieved and interpreted.
I am providing options to print this output to Printer or Word/RTF File.
I guess I can use the printer and word controls to do this.
What I want is a way to preview the generated document before opening it in word or sending it to printer.
I want to be able to preview the document as it is generated in a rich text box. How do I do this ?
Also I want to save the output of the interpreted program as an RTF file.... How do I do this ?
Note that only simple formatting commands (supported by RTF is implemented)