NotesUIDocument (LotusScript®)

Represents the document that's currently open in the Notes® workspace.

Note: This class is not supported in COM.

Containment

Contained by: NotesUIWorkspace

Contains: NotesDocument, NotesUIScheduler

Properties

AutoReload

CurrentField

DialogBoxCanceled

Document

EditMode

FieldHelp

HiddenChars

HorzScrollBar

InPreviewPane

IsNewDoc

ModifiedSinceSaved

PreviewDocLink

PreviewParentDoc

Ruler

WindowTitle

Methods

Categorize

Clear

Close

CollapseAllSections

Copy

CreateObject

Cut

DeleteDocument

DeselectAll

ExpandAllSections

FieldAppendText

FieldClear

FieldContains

FieldGetText

FieldSetText

FindFreeTimeDialog

FindFreeTimeDialogEx

FindString

Forward

GetObject

GetSchedulerObject

GetSelectedText

GotoBottom

GotoField

GotoNextField

GotoPrevField

GotoTop

Import

InsertText

NavBarSetText

NavBarSpinnerStart

NavBarSpinnerStop

Paste

Print

Refresh

RefreshHideFormulas

Reload

Save

SaveNewVersion

SelectAll

Send

SpellCheck

Events

Onblur

Onfocus

OnHelp

OnLoad

OnSubmit

OnUnload

PostModeChange

PostOpen

PostRecalc

PostSave

PostSend

QueryClose

QueryModeChange

QueryOpen

QueryRecalc

QuerySave

QuerySend

Access

There are four ways to get the "current" document:

  • To get the document (if any) that has focus, use the NotesUIWorkspace.CurrentDocument property.
  • To get the document associated with a form event such as PostOpen, refer to the Source argument passed to the event.
  • To "compose" a new document in a database, access the unsaved document, and access the new document window, use the NotesUIDocument returned by the ComposeDocument method in NotesUIWorkspace.
  • To open the currently highlighted document in a view, or a specific document whose NotesDocument object you have, and access the new document window, use the NotesUIDocument returned by the EditDocument method in NotesUIWorkspace.

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.

Example