AutoVersion 属性

       

返回或设置自动保存文档版本所需选项的状态。可以是下列 WdAutoVersions 常量之一,可读写。

expression.AutoVersion

expression   必需。该表达式返回“应用于”列表中的一个对象。

注意   如果将 AutoVersion 属性设置为 wdAutoVersionOnClose,则在文档关闭时自动保存该文档的版本。

示例

本示例禁用活动文档关闭时用于自动保存文档版本的选项。

ActiveDocument.Versions.AutoVersion = wdAutoVersionOff

如果文档 Report.doc 设有自动保存文档版本的选项,则本示例将在状态栏中显示一条消息。

If Documents("Report.doc").Versions.AutoVersion = _
        wdAutoVersionOnClose Then
    StatusBar = "A version will be automatically saved"
End If