Find document by NoteID
Every want to find a document by noteid here is a utility that will allow you do to that.
Every want to find a document by noteid here is a utility that will allow you do to that.
Create an admin tools database. In the database create a form and add the following fields.
FIELDNAME: Server Type : Names Comment : Use address book for lookup FIELDNAME: DBPath Type : Text FIELDNAME: NoteID Type : Text Translation Formula: @IF(@Contains(NoteID;"NT");@Right(NoteID;@Length(NoteID)-2);NoteID) This will remove the NT portion of the ID. FIELDNAME: SaveOptions Type : Text Value : "0" (Computed when composed)DESC: This will prevent the current
document from being saved in the database BUTTON: Used to execute the code below. When you click on the button it goes out and finds the noteid in the
database you specify and opens it in the current UI window. Code: Sub Click(Source As Button) Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim uinote As NotesUIDocument Dim doc As NotesDocument Dim s As New NotesSession Dim db As NotesDatabase Set uidoc = ws.CurrentDocument Call uidoc.refresh server = uidoc.FieldGetText("Server") dbpath = uidoc.FieldGetText("DbPath") noteid = uidoc.FieldGetText("NoteID") Set db = s.GetDatabase(server, dbpath) If db.isopen Then Set doc = db.GetDocumentByID( noteid) If Not doc Is Nothing Then Set uinote = ws.EditDocument(False, doc) End If Else Msgbox "Unable to open (" & dbpath & ") Please check
spelling and or access and try again.", 48,"Unable to open database" End If End Sub