#1
|
|||
|
|||
Auto-saving word docs
Hey Guys,
I found this code on the web some where, and I works well except for two things- When active in another program such as Firefox, it does not save the Word doc. When working between multiple Word docs, it only saves the active one. Suggestions? Code:
Public Sub FileSave() ActiveDocument.Save DoEvents Application.OnTime _ When:=Now + TimeValue("00:05:00"), _ Name:="FileSave" Application.StatusBar = "Saved: " & ActiveDocument.Name End Sub |
#2
|
|||
|
|||
Try:
Code:
Public Sub FileSave() ActiveDocument.ActiveWindow.Visible = True ActiveDocument.Save DoEvents Application.OnTime _ When:=Now + TimeValue("00:05:00"), _ Name:="FileSave" Application.StatusBar = "Saved: " & ActiveDocument.Name ActiveDocument.Close Application.Quit End Sub Last edited by dwirony; 02-21-2017 at 03:08 PM. Reason: Incorrect solution |
#3
|
|||
|
|||
When run this stalls on the second line highlighting "Visible"
Code:
ActiveDocument.ActiveWindow.Visible = True I am only trying to save all open docs, not close or quit Word- |
#4
|
||||
|
||||
See http://www.gmayor.com/automatically_backup.htm which will do as you require (in Excel also).
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
Slight problem Graham, I'm using this on a Mac-
|
#6
|
||||
|
||||
Your post says Office 2013 on Windows 8?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#7
|
|||
|
|||
I also run Mac, this macro I need for the Mac. Forgot to mention it in the first post-my bad-
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Saving Merged Files into Sep Docs By Name and into PDF | accessnewbie352 | Mail Merge | 15 | 07-02-2015 09:40 PM |
Word auto updating fields and changing numbers when saving to PDF | OAEC | Word | 1 | 12-03-2013 08:01 PM |
Text Shifting When Saving Word 2007 Docs | DerekS | Word | 1 | 09-21-2013 02:42 AM |
Auto Saving in Word, | Jamal NUMAN | Word | 3 | 01-19-2013 11:50 AM |
Icons in the desktop move when saving docs | ryochan | Word | 0 | 09-26-2009 02:12 AM |