I have a form that I have put a button on which, when pressed creates another workspace in the client and then displays a document whose UNID is found using the dreaded @DbLookup . I finally got this working using formula language but am curious if this could also be accomplished using LotusScript in an Agent. I looked in the LotusScript help but didn’t see anything that was immediately obvious to me. Any one have any thoughts on how one might accomplish it?
Subject: uiWorkspace.EditDocument
Hi Steve
Look at this:
Sub Initialize
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim UNID As String
Dim doc As NotesDocument
Set db = session.CurrentDatabase
UNID = "A1066EA1FAA63BEBC125762D0048DC1D"
Set doc = db.GetDocumentByUNID(UNID)
Call ws.EditDocument(False, doc)
End Sub
HTH, Bodo
Subject: works perfectly
Hi Bodo, Thanks for the information the code works perfectly and, because it is more convenient I will use this instead of the Formula language code.
Steve