Create a link hotspot to open document to a specific part

Greetings All,

Using lotusscript, in a Rich Text field I need to create a link to open a long document and scroll down for example to specific field. I can not create an anchor in the target document because it doesn’t have rich text fields.

The other question I have is that whether it is possible to create action hotspots in Rich Text fields?

Any help will be appreciated.

Subject: RE: Create a link hotspot to open document to a specific part

There is no doclink that will link you to a position on a document other than the beginning, without specifying an anchor.

There’s no way to specify position in a document based on a field, unless the document is in edit mode in which case you can set focus to that field using LotusScript or formula.

I don’t see any way to put an anchor on a form (or at least, you can paste one there, but it doesn’t seem to work to reference it in a Notes URL).

If you have a programmable tabbed table, you could perhaps use a formula to determine what tab to display on opening the document, and have code record information somewhere that this formula could refer to it (perhaps by opening the document from a particular view). So the thing you click would have to be an action hotspot of some sort – a button, for instance.

The NotesRichTextItem class and associated classes, do not support being able to create such controls automatically “from scratch.” However, you could either hardcode them on the form, or create them in a rich text item elsewhere that you could look up, copy and append to your document, depending whether you needed the link to be in a rich text item or if it could be on the form. The formula or script could refer to fields in the current document, to find out which other document it was supposed to open.

Another option is to use hotspots or the URL type, which can use a formula to calculate their target. This can be a Notes URL, specifying both the view and document of the target.

  • Andre Guirard, IBM/Lotus Development

Useful blog: Best Practice Makes Perfect

For faster answers, be C R I S P Y

Subject: RE: Create a link hotspot to open document to a specific part

Thanks Andre for response -

I don’t have a programmable table on the form and that’s why I need to scroll it down - I guess I will create another form to display only the part I need.