Sub Queryopendocument(Source As Notesuiview, Continue As Variant)
Dim ws As New NotesUIWorkspace
Dim Doc As NotesDocument
Dim ss As New NotesSession
Dim db As NotesDatabase
Set db=ss.CurrentDatabase
Set doc=db.GetDocumentByID(Source.CaretNoteID)
Call ws.DialogBox("form", True, True, True, True, True, False, "Test", doc, True, True, False)
Continue = False
End Sub