trichview.com

trichview.support




Re: Combining several RTF files into one report file


Return to index


Author

Message

Sergey Tkachenko

Posted: 04/26/2004 22:20:18


Would it be ok if these markers will be simple strings? For example,

'<FILE1>', '<FILE2>', etc.


The simplest solution is this case is


rve.Clear;

rve.LoadRTF('template.rtf');

rve.Format;

for i := 1 to 8 do

begin

  s := Format('<FILE%d>', [i]);

  FileName := Format('file%d.rtf', [i]);

  rve.SetSelectionBounds(0, rve.GetOffsBeforeItem(0),

    0, rve.GetOffsBeforeItem(0));

  if rve.SearchText(s, [rvseoDown]) then

    rve.InsertRTFFromFileEd(FileName);

end;


This is not the most efficient solution, but it will work.

Make sure that "Allow adding styles dynamically" mode is set for rve (right

click it in Delphi, choose "Settings" in the context menu)



> Hello,

>

> I'm considering buying TRichview, because it looks like it supports all

the

> stuff I need. One thing i can't really figure out though:

>

> I have a program which generates 8 RTF files. These RTF files are saved on

> the harddisk. Also, some bitmaps are generated, and they are saved as

BMPs.

>

>

> What i want to end up with is one RTF file with a predefined layout (i.e.

> Chapter 1, Chapter 2 etc.), and in each chapter the specified RTF file

should

> be inserted. Besides that, the bitmaps have to be inserted into a seperate

> subchapter as well.

>

> Is it possible to use some sort of "template" RTF, created in Word, in

which

> at specified markers i can insert the RTF files or the images? If so, how

> do i specify and look-up the markers?

>

> Thanks in advance for any help!

>

> -Sma





Powered by ABC Amber Outlook Express Converter