DeleteDocument (NotesUIDocument - LotusScript®)

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

Defined in



Call notesUIDocument .DeleteDocument


The document is not actually deleted from the database until the user refreshes the view or closes the database, and chooses to delete the marked document.

If the current document is already marked for deletion, this method closes the document, leaving the deletion mark in place.


This method is invalid when the document is in Edit mode: "Document command is not available."

If you try to use the NotesUIDocument object after calling this method, Notes® raises an error: "NotesUIDocument object is no longer valid."