LOTUSSCRIPT/COM/OLE CLASSES
Examples: DeleteDocument method
1. 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
2. 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
See Also
DeleteDocument method
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary