Delete document

Good morning, I put the LotusScript code in the PostSave event of the form below. I do not want the uidoc showing up on the view( I just use it to make others ), but it is still there with a delete mark, how to permanently delete this document or making it does not show up in the view?

If Source.EditMode =True Then

	Source.EditMode= False

	Source.DeleteDocument

End If 

Call workspace.ViewRefresh

Thanks,

Linda

Subject: Delete document.

You can try NotesDocument.Remove method. But even that wont work correctly because you have instantiated the document using NotesUIdocument Class. What you can do is once closing the document , delete the document in the backend(Getting the document using UNID or key and then delete it in back end)