How to Get a Periodic Save Reminder for Your Unsaved Word Document

In this article, we want to offer you a way to get a periodic save reminder for your unsaved Word document as to save file in time.

Speaking of save function, there is auto save in Word. You set a fixed time interval and Word shall save any changes made to the document. But, this works, on condition that the document has been saved. The fact is that we tend to create a new document and indulge ourselves in work without noticing we haven’t saved it at all. Though we hate to admit, there is a great chance that we lose all work due to a power outage. Therefore, it shall be nice to get a save reminder to avoid the bad luck.Get a Periodic Save Reminder for Your Unsaved Word Document

Get a Save Reminder

  1. First and foremost, press “Alt+ F11” in Word to invoke the VBA editor.
  2. Next, click “Normal”.
  3. Then click “Insert” tab and choose “Module” on the drop-down menu.Click "Normal"->Click "Insert"->Click "Module"
  4. There shall be a new module. Double click to open it.
  5. And paste the following codes on the module:
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:05: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
  1. Lastly, click “Save”.Paste Codes->Click "Save"

Now if you open a new document, there will be a message box, such as bellow:Click Either "Yes" or "No"

Click “Yes” and there will be the “Save As” window open. And click “No”, there will be another box, showing how many unsaved documents you have.Number of Unsaved Documents

The message will pop up every 5 minutes along with the total number of unsaved documents open until you save the document. In case you click “Yes” but cancel the storage in “Save As” window, the macro will continue running in the background.

Turn to Professional for Repairing Work

We human love puzzles. So when we end up with a damaged doc, it’s common for us to find solutions on our own. But retrieve broken files can be like performing surgeries, both of which shall be left for professionals. You can easily cause more severe damages to your files due to insufficient knowledge of a subject. Therefore, it’s advisable to turn to a qualified repairing tool once you have any document corrupt.

Author Introduction:

Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including Excel repair and pdf repair software products. For more information visit www.datanumen.com

Comments are closed.