HOW TO
Instructions provide sample code which allows the current ArcMap document to close without prompting the user whether to save edits to the document file.
Note:
Code in the Project's ThisDocument code module will only run in the current map document. If you want to store the code in all your map documents open the Normal.mxt ThisDocument code module instead.
Code:
Private Function MxDocument_BeforeCloseDocument() As Boolean
Dim pdoc As IMxDocument
Set pdoc = ThisDocument
Dim pdirty As IDocumentDirty2
Set pdirty = pdoc
pdirty.SetClean
End Function
Note:
When using either an MXD or MXT containing this code, ArcMap will not prompt whether changes should be saved when the application closes.
Get help from ArcGIS experts
Download the Esri Support App