2 Quick Ways to Auto Back up Your Word Document Periodically

In this article, we would like to share with you 2 quick ways to auto back up your Word document periodically as to secure them.

It’s well-known that Word has an auto save function to save your document. Yet, it saves only new changes made to the document and there is and will always be one file. This is not so ideal since out of all kinds of reasons, such as power outages, your file has a high possibility of getting corrupt. Then what if you have a backup copy? That will definitely address the awkwardness.Auto Back up Your Word Document Periodically

Follow us to see what you can do.

Method 1: Alter Word Options

  1. First of all, click “File” tab.
  2. Then click “Options” to open “Word Options” dialog box.   Click "File"->Click "Options"
  3. Next click “Advanced” on the left column.
  4. Scroll down to “Save” part and check “Always create backup copy” box.
  5. And click “OK” to save your change.Click "Advanced"->Check "Always create backup copy" Box->Click "OK"
  6. Now save and close your file and go to the location where you store it. You will see a backup file as bellow:Backup Copy

Method 2: Run Word Macro to Create a Backup Copy

  1. First and foremost, press “Alt+ F11” to trigger the VBA editor.
  2. Next double click “Normal”.
  3. Then double click “Modules”.
  4. Double click “NewMacros” to bring out the editing space on the right side.Double Click "Normal"->Double Click "Modules"->Double Click "NewMacros"->Paste Codes->Click "Save"
  5. And paste the following macro there:
Sub AutoOpen()
  Dim strBackupPath As String
 
  nReturnValue = MsgBox("Do you want to open AutoBackupDocument?", 4, "Auto Backup Document")
  If nReturnValue = 6 Then
    Call AutoBackupDocument
  End If

End Sub

Sub AutoBackupDocument()
  Dim dtNewBackupTime As Date
  Dim strFilePath, strFileName As String
  Dim strFileFormate As String

  strFileFormat = Right(ActiveDocument.Name, 4)
 
  If StrComp(strFileFormat, ".doc", vbTextCompare) = 0 Then
    dtNewBackupTime = Now + TimeValue("00:00:10") ' Change the "00:00:10" to the real backup interval time you want.
    strFilePath = ActiveDocument.Path
    strFileName = Left(ActiveDocument.Name, Len(ActiveDocument.Name) - 4)
    ChangeFileOpenDirectory strFilePath
    ActiveDocument.SaveAs FileName:="C:\Users\Public\Documents\New folder\Test2\" & strFileName & "_backup.doc", ReadOnlyRecommended:=True ' Change the "C:\Users\Public\Documents\New folder\Test2\" as the real path which you need to put the backup file.
    ActiveDocument.SaveAs FileName:=strFileName & ".doc", ReadOnlyRecommended:=False
    Application.OnTime When:=dtNewBackupTime, Name:="AutoBackupDocument"
    CreateObject("Wscript.shell").popup "An new backup:" & strFileName & "_backup.doc", 2, "Auto close this box after 2s"
    Else
    If StrComp(strFileFormat, "docx", vbTextCompare) = 0 Then
      dtNewBackupTime = Now + TimeValue("00:00:10") ' Change the "00:00:10" to the real backup interval time you want.
      strFilePath = ActiveDocument.Path
      strFileName = Left(ActiveDocument.Name, Len(ActiveDocument.Name) - 5)
      ChangeFileOpenDirectory strFilePath
      ActiveDocument.SaveAs FileName:="C:\Users\Public\Documents\New folder\Test2\" & strFileName & "_backup.docx", ReadOnlyRecommended:=True ' Change the "E:\Temp\backup\" as the real path which you need to put the backup file.
      ActiveDocument.SaveAs FileName:=strFileName & ".docx", ReadOnlyRecommended:=False
      Application.OnTime When:=dtNewBackupTime, Name:="AutoBackupDocument"
      CreateObject("Wscript.shell").popup "An new backup:" & strFileName & "_backup.docx", 2, "Auto close this box after 2s"
    End If
  End If
End Sub
  1. Lastly, click “Save”.

Then next time you open the document, there will be a message, asking whether you want to auto back up the file. Just click either “Yes” or “No” as you need.Click Either "Yes" or "No"

If you click “Yes”, then with each 10 seconds, there will be a message box, telling the backup copy is updated. It shall auto close in 2 seconds. You certainly can close it immediately by clicking “OK”.Result Box

Notes:

  1. Firstly, the code line “dtNewBackupTime = Now + TimeValue(“00:00:10”)” means every 10 seconds, a backup copy will be created and overwrite the previous one. You need to change the time value.
  2. Secondly, “C:\Users\Public\Documents\New folder\Test2\” is the address where you want backup file locates. Similarly, replace it with an actual one.

File Corruption Killer

More and more work goes digital. This means there are more digital files kept on all kinds of devices. Consequently, their security requires our double check all the time. However, if we are out of luck sometimes, we can just end with bumping into docx corruption. So in such scenario, choose an advanced repairing tool is all you need to battle with corruption.

Author Introduction:

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

Comments are closed.