How to contact files RVF

General TRichView support forum. Please post your questions here
Post Reply
retwas
Posts: 39
Joined: Tue May 21, 2013 1:41 pm

How to contact files RVF

Post by retwas »

Hi,

I would know how to concat files and text.

I have a RVF files who is my email signing.
And then I want to put text before this sign.

I begin to do a loadRVF, it's okay, I see my sign.
But I want to put text before, I use ParaNo on the Add function with -1 or 0 but it's always at the end of my text...

Here is my code:

Code: Select all

rvDocument.LoadRVF(sLink);

rveDocument.Add('my message', -1);
Can you help me ?

Thanks
retwas
Posts: 39
Joined: Tue May 21, 2013 1:41 pm

Re: How to contact files RVF

Post by retwas »

Sorry my code is:

Code: Select all

rvDocument.LoadRVF(sLink);

rveDocument.AddNL('my message', -1, -1);
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

AddNL (and other Add*** methods) always add content to the end.
Please do not use -1 in StyleNo parameter.
As for ParaNo, -1 adds to the end of the last paragraph.

The correct code is:

Code: Select all

rveDocument.Clear;
rveDocument.AddNL('my message', 0, 0);
Stream := TFileStream.Create(sLink, fmOpenRead);
rvDocument.InsertRVFFromStream(Stream, rvDocument.ItemCount);
Stream.Free;
retwas
Posts: 39
Joined: Tue May 21, 2013 1:41 pm

Post by retwas »

Thanks for help :)
Post Reply