Page 1 of 1

Loading hyperlink object saved by TRichView on Word

Posted: Tue Jan 20, 2009 2:18 pm
by Prometeus
Hello,


I need to build documents from scratch and include some hyperlinks to MP3 files, saving them as '.DOC' (using SaveRTF) in order to open them using Word in other PCs.

I'm using the principle used in the 'CreateHyperlink' Demo but the saved RTF file when opened by Word shows the underlined hyperlink but doesn't save the hyperlink to the MP3 file. I don't want include the MP3 files onto the .DOC file created, just the hyperlinks to them. Is this possible using TRichView? If so, how?

Thanks for any help here.

Posted: Tue Jan 20, 2009 4:28 pm
by Sergey Tkachenko
Process OnWriteHyperlink event:

Code: Select all

procedure TForm1.RichViewEdit1WriteHyperlink(Sender: TCustomRichView;
  id: Integer; RVData: TCustomRVData; ItemNo: Integer;
  SaveFormat: TRVSaveFormat; var Target, Extras: String);
begin
  Target := PChar(RVData.GetItemTag(ItemNo));
end;

Posted: Wed Jan 21, 2009 1:18 pm
by Prometeus
Hello Sergey,



Thanks! It worked!