Document.IsInAutosave Property (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns False if the most recent firing of the Application.DocumentBeforeSave Event (Word) event was the result of a manual save by the user, and not an automatic save. Read-only.

expression .IsInAutosave

expression A variable that represents a Document object.

The IsInAutosave property is designed to be used in an event handler for the Application.DocumentBeforeSave event. Using it for other purposes is not recommended.

Note Note

In Visual Basic for Applications (VBA), the True keyword has a value of negative one (-1). The IsInAutosave property, however, returns positive one (1) for True, rather than -1. As a result, IsInAutosave never returns the VBA True keyword. To determine if the property is true, use code similar to that shown in the following code sample. If you determine that IsInAutosave is true, you can safely avoid doing any of the additional processing you might normally do for a manual save operation.

Use the following code to determine if IsInAutosave is true:

If Word.ActiveDocument.IsInAutosave = False Then
   Debug.Print "Manual save."
   Debug.Print "Automatic save."
End If


Other resources