【问题标题】:How do I find the time of last typed word in Microsoft Word?如何在 Microsoft Word 中找到最后输入单词的时间?
【发布时间】:2015-08-18 15:20:08
【问题描述】:

在 Excel 中,您可以使用 VBA 编码找出最后一个条目是在特定单元格中输入的时间。
我想知道在 Word 中是否也可以这样做。

我特别想知道上次输入的时间和日期。

【问题讨论】:

    标签: vba time ms-word


    【解决方案1】:

    在 Word 中,您无法获取特定 Word 输入文档的时间。您可以获得的是文件最后一次保存的时间:

    Sub PrintLastSaveTime()
        Dim propLastSaved As DocumentProperty
        Dim propLastAuthor As DocumentProperty
    
        Set propLastSaved = ActiveDocument.BuiltInDocumentProperties(WdBuiltInProperty.wdPropertyTimeLastSaved)
        Set propLastAuthor = ActiveDocument.BuiltInDocumentProperties(WdBuiltInProperty.wdPropertyLastAuthor)
    
        Debug.Print "The document was last saved by " & propLastAuthor.Value & " at "; propLastSaved.Value
    
    End Sub
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-13
      • 1970-01-01
      • 2013-08-01
      • 1970-01-01
      • 2021-10-17
      • 1970-01-01
      • 2022-01-04
      • 2017-03-02
      相关资源
      最近更新 更多