Examples: NotesUIDocument class

This script uses a NotesUIWorkspace to get the current document. It then uses the FieldGetText method to print the Subject field of the current document.

Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
Messagebox( uidoc.FieldGetText( "Subject" ) )