Page 1 of 1

How to contact files RVF

Posted: Wed Jun 05, 2013 1:42 pm
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

Re: How to contact files RVF

Posted: Wed Jun 05, 2013 1:46 pm
by retwas
Sorry my code is:

Code: Select all

rvDocument.LoadRVF(sLink);

rveDocument.AddNL('my message', -1, -1);

Posted: Thu Jun 06, 2013 7:46 am
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;

Posted: Thu Jun 06, 2013 2:03 pm
by retwas
Thanks for help :)