Examples: DeleteDocument method (NotesUIDocument - LotusScript)
- This script closes the current document and marks it for deletion.
If the document is in Edit mode, however, the script does nothing.
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
If Not ( uidoc.EditMode ) Then
Call uidoc.DeleteDocument
End If
End Sub
- This script incorrectly tries to categorize the current document
after calling DeleteDocument.
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
If Not ( uidoc.EditMode ) Then
Call uidoc.DeleteDocument
Call uidoc.Categorize( "Purged" )
'error, since uidoc object is not valid
End If
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.