Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For unsaved word file, pop up a save reminder every 3 minutes

Status
Not open for further replies.

Rachal

IS-IT--Management
May 12, 2017
1
SG
hi, guys.

It seems that the auto save fuction in Word can only work for the files which had been saved. I open an new document and edit on it, it would not be auto saved in Word. So after I got a crush in Word and I found that what I have worked in that unsaved word file are all gone. It sucks.

So I'm thinking why Word cannot pop up a save reminder for that unsaved word file periodically, for example: 3 minutes. I don't find a way to do that so far. Can that be possible?
 
It seems that the auto save fuction in Word can only work for the files which had been saved.
Not so. In the event of a crash, Word will generally be able to recover the unsaved file automatically when it re-starts; if it doesn't, you may still be able to recover it via File|Recent>Recover Unsaved Documents.

Cheers
Paul Edstein
[MS MVP - Word]
 
HI,Rachal

You can find the unsaved file just like macropod said above. And if you still want a remind for unsaved word file, you may need to write VBA codes for it.

Below is a macro which may help.

Sub AutoNew()
Dim objDoc As Document
Dim strButtonValue As String
Dim dtAskingTime As Date

' Initialization
Set objDoc = ActiveDocument
' Set the asking time in 5 minutes.
dtAskingTime = Now + TimeValue("00:03:00")

If objDoc.Path <> "" Then
Exit Sub
Else
strButtonValue = MsgBox("This document has not been saved yet." & vbCr & "Do you want to save the file?", vbYesNo)
If strButtonValue = vbYes Then
Dialogs(wdDialogFileSaveAs).Show
' In case you click Cancel button, the macro continue running and prompting message in every 5 minutes.
If objDoc.Path = "" Then
Application.OnTime When:=dtAskingTime, Name:="AutoNew"
End If
Else
Application.OnTime When:=dtAskingTime, Name:="AutoNew"
End If
End If
Call CountUnsavedDoc
End Sub

Sub CountUnsavedDoc()
Dim objDoc As Document
Dim nDocUnsaved As Integer

nDocUnsaved = 0

For Each objDoc In Documents
If objDoc.Path = "" Then
nDocUnsaved = nDocUnsaved + 1
End If
Next objDoc
nDocUnsaved = MsgBox(nDocUnsaved, 0, "Number of unsaved document")
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top