Table of contents
TOC
折叠目录
展开目录

Document.AutoRecover 属性 (Visio)Document.AutoRecover Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

确定启用自动恢复时是否复制具有未保存更改的打开的文档。读/写。Determines whether an open document that has unsaved changes is copied when automatic recovery is enabled. Read/write.

语法Syntax

表达式自动恢复expression . AutoRecover

表达式_一个表示文档对象的变量。_expression A variable that represents a Document object.

返回值Return Value

BooleanBoolean

注解Remarks

如果启用自动恢复 (如果Application.AutoRecoverInterval属性值大于 0),所有文档已打开且有未保存的更改将被都复制到临时文件中。如果您不希望要恢复的文档,自动恢复属性设置为False自动恢复属性不与文档一起保存,并且必须设置每次打开该文档。If automatic recovery is enabled (if the Application.AutoRecoverInterval property is greater than 0), all documents that are open and have unsaved changes are copied into temporary files. If you do not want a document to be recovered, set its AutoRecover property to False . The AutoRecover property is not saved with a document and must be set each time the document opens.

当 Microsoft Visio 在异常终止后启动并确定已启用自动恢复时,它将尝试打开在终止时已打开的所有文件。When Microsoft Visio is launched after an abnormal termination and determines that automatic recovery was enabled, it attempts to open all files that were open at termination.

  • 如果是比上次保存该文件的副本的恢复文件,Visio 将打开恢复的文件并显示名称" (恢复)"在文档的标题栏中。If there is a recovery file that is more recent than the last saved copy of the file, Visio opens the recovered file and displays the name " (Recovered)" in the document's title bar.

  • 如果没有恢复文件,Visio 将打开上次保存的文档副本。If there is no recovery file, Visio opens the last saved copy of the document.

您仍然必须在 Visio 关闭之前保存对恢复的文档的更改。如果不保存恢复的文档,更改将被放弃,就像在任何未保存的文档中一样。You must still save changes to recovered documents before Visio closes. If you do not save recovered documents, changes are discarded, as in any unsaved document.

示例Example

此 Microsoft Visual Basic for Applications (VBA) 宏显示如何使用自动恢复属性来禁用特定文档的自动恢复。This Microsoft Visual Basic for Applications (VBA) macro shows how to use the AutoRecover property to disable automatic recovery for a particular document.


Private Sub Document_DocumentOpened(ByValdoc As IVDocument) 

    'Do not recover this document 
    ThisDocument.AutoRecover = False 

End Sub
© 2018 Microsoft