Greetings, I was trying to save my documents if the document was not saved for more than five minutes. I went this far but it is not dynamic enough. How can this be modified to get the job done? Thanks in advance!!
Code:
Function lastsavetime(de As Boolean)
Dim bb As String, curt As Date, curr, intt As Integer, inttt As Integer, last As Date
curt = Now()
intt = InStr(1, curt, ":")
curr = Mid(curt, intt + 1, 2)
last = ActiveDocument.BuiltInDocumentProperties("Last Save Time")
inttt = InStr(1, last, ":")
bb = Mid(ActiveDocument.BuiltInDocumentProperties("Last Save Time"), intt + 1, 2)
If CInt(bb) - CInt(curr) >= 5 Then
de = True
End If
End Function