Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






Accessing the current document in LotusScript classes

You can access the back-end document that is currently open through the NotesUIWorkspace and NotesUIDocument classes. Using the NotesUIView class, you can access the back-end documents in the view with the Documents property.

The NotesUIDocument class has the following properties:

Property
Data type
Description

AutoReload

Boolean

(Read-write) True to automatically reload the current document any time there is a change.

CurrentField

String

(Read-only) The name of the current field if the document is in Edit mode.

DialogBoxCanceled

Boolean

(Read-only) Indicates if a user cancels a dialog.

Document

NotesDocument

(Read-only) A reference to the NotesDocument object associated with this document window, giving you access to the back-end properties and methods. If you modify and save an item using the NotesDocument object, the item is automatically updated in the workspace, except for rich text items.

EditMode

Boolean

(Read-write) True for Edit mode.

FieldHelp

Boolean

(Read-write) True to display field help.

HorzScrollBar

Boolean

(Read-write) True if the horizontal scroll bar is visible.

HiddenChars

Boolean

(Read-write) True to display hidden characters.

InPreviewPane

Boolean

(Read-only) True if the document is being accessed from the preview pane.

IsNewDoc

Boolean

(Read-only) True if the document is not yet saved.

PreviewParentDoc

Boolean

(Read-write) True if the lower pane containing the parent document is displayed.

PreviewDocLink

Boolean

(Read-write) True if the lower pane containing the linked document is displayed.

Ruler

Boolean

(Read-write) True if the ruler is visible.

WindowTitle

String

(Read-only) The name of the window title.

The NotesUIDocument class has the following methods:

Method
Description

Categorize

Categorizes the current document.

Clear

Clears the selected text.

Close

Closes the current document.

CollapseAllSections

Collapses all sections in the document.

Copy

Copies the selected text to the Clipboard.

CreateObject

Creates an object in a rich text item.

Cut

Cuts the selected text and places it on the Clipboard.

DeleteDocument

Marks the current document for deletion and closes it. The NotesUIDocument object is no longer available once you call this method.

DeselectAll

Deselects the entire contents of the current field.

ExpandAllSections

Expands all sections in the document.

FieldAppendText

Appends the specified text to the specified or current field.

FieldClear

Clears the contents of the specified or current field.

FieldContains

Returns True if the specified or current field contains the specified case-sensitive text.

FieldGetText

Gets the text of the specified or current field.

FieldSetText

Sets the specified or current field to the specified text.

FindFreeTimeDialog

Brings up the Find Free Time box.

FindFreeTimeDialogEx

Brings up the Find Free Time box to allow searches for available meeting times.

FindString

Finds the text in a given field.

Forward

Creates a new mail document and prompts for recipients.

GetObject

Gets a specified object.

GetSchedulerObject

Gets an embedded scheduler.

GetSelectedText

Gets the selected text in a UI document.

GotoTop

Goes to the first field or scrolls to the top of the document.

GotoBottom

Goes to the last field or scrolls to the bottom of the document.

GotoField

Given a field name, puts the cursor in the specified field in a document.

GotoNextField

Goes to the next field or scrolls so that it is visible.

GotoPrevField

Goes to the previous field or scrolls so that it is visible.

GotoTop

Places the cursor in the first editable field or the first button in a document.

Import

Imports a file to the document.

InsertText

Inserts the specified text at the current cursor position.

NavBarSetText

Sets the URL navigation bar text.

NavBarSpinnerStart

Starts the URL navigation bar spinner.

NavBarSpinnerStop

Stops the URL navigation bar spinner.

Paste

Pastes the Clipboard text to the current cursor position.

Print

Prints the current document.

Refresh

Refreshes the document.

RefreshHideFormulas

Recalculates the hide-when formulas for the current document; this is an expensive operation.

Reload

Refreshes the current document with any changes made to the stored document.

Save

Saves the current document.

SaveNewVersion

Saves the current document as a new version.

SelectAll

Selects the entire contents of the current field.

Send

Mails the current document and closes it.

SpellCheck

Checks the spelling in a document.

The NotesUIView class has the following properties:

Property
Data type
Description

CalendarDateTime

Variant of type DATE

(Read-only) The date and time of the current region in a calendar view.

CaretCategory

Variant

(Read-only) Returns the current category in the view for the current document.

Documents

NotesDocumentCollection

(Read-only) All the documents that the current NotesUIView event is working on.

View

NotesView

(Read-only) The back-end view that corresponds to the currently open view.

The NotesUIView class has the following methods:

Method
Description

Print

Implements the @Command([FilePrint]). Prints the currently open or selected document(s), or the current view.

SelectDocument

Selects the specified document in a view.

For a list of events in NotesUIView, see "Event Descriptions" in the "Programming Overview" chapter.

See examples

Examples: Accessing the current document
Related topics
Accessing documents in LotusScript classes




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009