I want to code a field to contain a link to the current document, but here’s the catch: Instead of the typical Notes docLink icon, it should display as hotspot text (using the document title as the text).
I’ve been looking at Designer Help, and this appears to be quite an undertaking. (For example, “To access a NotesRichTextDocLink object, use the NotesRichTextNavigator methods in conjunction with the type RTELEM_TYPE_DOCLINK.” Yikes!)
Is there an established pattern for doing this?
Subject: Create DocLink as HyperText
Marc,
The NotesRichTextItem.AppendDocLink method allows you to specify text as the hotspot. From the designer help:
Example
Inserts a doclink in a rich text item.
Defined in
NotesRichTextItem
Syntax
Call notesRichTextItem.AppendDocLink( linkTo, comment$ [, HotSpotText$ ] )
Parameters
linkTo
NotesDatabase, NotesView, or NotesDocument. The database, view, or document to which you want to link.
comment$
String. The text that appears when a user presses and holds the mouse pointer over the doclink.
HotSpotText$
Note This parameter is new with Release 5.
Optional. String. If supplied, the HotSpotText appears in the rich text item as boxed text which can be clicked on with the mouse to follow the doclink. In this case, no other token appears in the text.
Usage
By default the insertion occurs at the end of the item. You can change the insertion point with BeginInsert and EndInsert.
The HotSpotText$ parameter should do what you want.
hth.
brandt
Subject: RE: Create DocLink as HyperText
Wow! I completely missed that.
Thank you!