Page 1 of 1

HTML with/without active hyperlinks?

Posted: Thu Dec 13, 2007 2:43 pm
by vega
On the click of a button, I need to save two HTML files to disk from the same rvf document and in one go. The first file must have active HTML links and not the second file.

I know how to do that separately with SaveHTMLEx using or not using the OnWriteHyperLink event. However I don't know how to avoid triggering the OnWriteHyperLink when the second file (no active links) is written to disk. I don't really find my way through all the params and options of OnWriteHyperLink.

Thanks in advance for any help.

Posted: Thu Dec 13, 2007 4:18 pm
by Sergey Tkachenko
You may assign RichViewEdit1.OnWriteHyperlink := nil before saving the-no hyperlink file, and reassign it to the proper procedure when saving file with links.

Posted: Thu Dec 13, 2007 5:26 pm
by vega
Sergey Tkachenko wrote:You may assign RichViewEdit1.OnWriteHyperlink := nil before saving the-no hyperlink file, and reassign it to the proper procedure when saving file with links.
Thanks, the de-assigning works. I reassign it like this :

RichViewEdit1.OnWriteHyperlink := RichViewEdit1.OnWriteHyperLink;

Is this the proper way to do it?

Posted: Tue Jan 15, 2008 6:47 am
by dave novo
Hi Vega,

That last bit of code does not make much sense.

something like

Code: Select all

oldEvent:=RichViewEdit1.OnWriteHyperlink;
RichViewEdit1.OnWriteHyperlink:=nil;
save stuff....
RichViewEdit1.OnWriteHyperlink :=oldEvent
would seem to be more useful

Posted: Tue Jan 15, 2008 7:19 am
by vega
dave novo wrote:Hi Vega,

That last bit of code does not make much sense.

something like

Code: Select all

oldEvent:=RichViewEdit1.OnWriteHyperlink;
RichViewEdit1.OnWriteHyperlink:=nil;
save stuff....
RichViewEdit1.OnWriteHyperlink :=oldEvent
would seem to be more useful
Thanks dave novo. That did it.