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
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