I’m using an agent with LotusScript to send an email notification. Within the email being sent I’m using the AppendDocLink method to have a link to a view within the DB. However, I was wondering if there was any way I could have a static link in there to a page/form. I have a page (or it can be a form) that contains a table with links to documents on our mail server. These are specific documents containing mail groups within our department wide address book.I need to be able to put a link in the email notifcation that is generated that just pulls up this page/form. I don’t want to have to link to a view first. Just want to open the page directly.
Any ideas? I searched the Help DB for the past hour now…
There is no “pagelink”, but you can link to a page IF you treat it as a document. Thanks to the NotesNoteCollection, you don’t need to know the NoteID or UNID of the page ahead of time, as long as you know the name of the page:
Dim s As NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Dim page As NotesDocument
Dim id As String
Set s = New NotesSession
Set db = s.CurrentDatabase 'or use GetDatabase to get another one
Set nc = db.CreateNoteCollection(False)
nc.SelectPages = True
Call nc.BuildCollection
id = nc.GetFirstNoteID
Set page = db.GetDocumentByID(id)
Do Until page.GetItemValue(“$Title”)(0) = “YourPageName”
id = nc.GetNextNoteID(id)
Set page = db.GetDocumentByID(id)
Loop
At this point, you have your page as a NotesDocument, and can use AppendDoclink as you would with any other document.
Oh, I never tried to use that as a link! Cool! But lookie here, there’s a NotesNoteCollection.SelectionFormula method that you can use to filter the notes based on their title or whatever, so you don’t need a loop.