auto backup Word file periodically


  1. Posts : 2
    win7x64
       #1

    auto backup Word file periodically


    Hello.

    I know that I can backup Word files when saving and closing your file by checking "Always create backup copy" box in Word Options.
    But can I make it auto backup periodically ? For example, every 5 minutes when I'm editing the file . It will much more safer to me. Any help will be appreciated. I'm using office2010
      My Computer


  2. Posts : 31,249
    Windows 11 Pro x64 [Latest Release and Release Preview]
       #2

    There is a built in function that has been in Word from the very beginning - this creates a hidden copy of the working file that is recoverable (automatically usually), after restarting work following a system failure

    Have not used Office 2010 in a long time but the control for this feature is under save in the options in Word 2016

    auto backup Word file periodically-capture.png
      My Computers


  3. Posts : 1
    windows 7
       #3

    Hi,BlancheBC

    As Barman said, in Word 2016 there is a auto save option to do that for you. But this is not available in word 2010. So if you want to do that in word 2010, you can write vba code as a workaround. Here is a close macro which may meet your needs, you can try it:

    Code:
    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:05:00") ' Change the "00:05:00" 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:05:00") ' Change the "00:05:00" 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
    I just find that in this link, also attach it here

    https://www.datanumen.com/blogs/2-qu...-periodically/

    Hope it will also help.
    Last edited by Rachal; 18 May 2017 at 20:20.
      My Computer


  4. Posts : 31,249
    Windows 11 Pro x64 [Latest Release and Release Preview]
       #4

    The autosave has been present in every word version I have supported - Starting from Word (long before they added Year numbers

    Microsoft Word Autosave
      My Computers


  5. Posts : 2
    win7x64
    Thread Starter
       #5

    Thanks all! I think I get my answer! thanks a lot!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:30.
Find Us