Represents the document that's currently open in the Notes® workspace.
There are four ways to get the "current" document:
Note the difference between the first two options shown previously. Code running in a form cannot assume that the form has focus unless the code is associated with an action button or similar control that can be activated only when the form has focus. Postopen, Queryclose, and Querysave events may occur when the document being opened, closed, or otherwise manipulated does not have focus. In composite applications, applications that use a frameset, or a default Notes view where documents can be opened in a preview pane, the component , frame, or pane containing the document does not necessarily have focus. In these cases, NotesUIWorkspace.CurrentDocument might return nothing or some other document that is open at the same time. For events associated with a form opening, NotesUIWorkspace.CurrentDocument might return the document that is current before the open operation.