Create a related link using a document Unique ID

I try to create a related link to a document, in a other document.

In the original document, I use an action button which allows me to select the related document.

I take back its DocumentUniqueID in a text format.

Then I would like to transform this text ID in a link.

I know that I could use an other way:

open the related view

copy selected document

back to original document

paste

but I wanted to know if there is an other way easier than this one.

Could you help me, pleaaaaase!

Subject: create a related link using a document Unique ID

I’m assuming you’re using LotusScript,

open a NotesDocument (linkTo) with the text ID that you have, then

Call notesRichTextItem.AppendDocLink( linkTo, comment$ [, HotSpotText$ ] )