Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread saving & reteriving formated text, how?
Mon, Jan 25 2010 4:15 PMPermanent Link

eeman khan
how can i post formated text into table, i want to save the a letter which is formated with diffrenet fonts and styles, borders etc into table, next time
when some one try to open the letter from my application, it is opened as it is saved.

anyone


regards
eeman khan
Mon, Jan 25 2010 9:34 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eeman,

<< how can i post formated text into table, i want to save the a letter
which is formated with diffrenet fonts and styles, borders etc into table,
next time when some one try to open the letter from my application, it is
opened as it is saved. >>

Create a table with a Memo field in it called Letter, and then use this
code:

with MyDBISAMTable do
   begin
   Append;
   TMemoField(FieldByName('Letter')).LoadFromFile('c:\myletters\myletter.doc');
   Post;
   end;

To load the letter again, use this:

with MyDBISAMTable do
   begin
   TMemoField(FieldByName('Letter')).SaveToFile('c:\myletters\myletter.doc');
   { Launch MS Word, etc. here and open the letter using ShellExecute,
etc. }
   end;

--
Tim Young
Elevate Software
www.elevatesoft.com

Image