Loading hyperlink object saved by TRichView on Word

General TRichView support forum. Please post your questions here
Post Reply
Prometeus
Posts: 16
Joined: Tue Jan 20, 2009 1:58 pm

Loading hyperlink object saved by TRichView on Word

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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;
Prometeus
Posts: 16
Joined: Tue Jan 20, 2009 1:58 pm

Post by Prometeus »

Hello Sergey,



Thanks! It worked!
Post Reply