
Tips.Net > WordTips Home > Files > A Real AutoSave in WordBasic
Summary: Creating macros that will AutoSave your document to its root location. (This tip works with Microsoft Word 6, and Word 95.)
Word has a built-in AutoSave feature that offers a limited amount of protection for the documents on which you are working. If you have AutoSave turned on, Word periodically (you can define how often) saves a copy of the document on which you are working. These periodic saves are stored in special backup files that Word maintains; it does not store them in the same document as the one on which you are working.
For instance, let's say you are working on a document named Report.doc, and that you have AutoSave enabled and set for every ten minutes. When the ten-minute mark is reached, Word stores the document in a temporary file, not back in Report.doc. The only time that this happens is when you explicitly save the file (by clicking on the Save button). Then Report.doc is saved and the temporary file is deleted. When you first start Word, it checks to see if any of these temporary files are on your system. If they are, then it "recovers" those files and gives you the chance to save them, if you desire.
There may be times when you want a real AutoSave instead of one that uses temporary files. For instance, you might want Report.doc saved every ten minutes--automatically. To do this, you need to create your own macros that take care of it for you. A series of three simple macros will accomplish the task. The first macro, AutoOpen, looks like this:
Sub MAIN WaitAutoSave End Sub
This macro automatically runs the second macro, WordSave, which looks like this:
Sub MAIN
OnTime Now+ TimeValue("00:10:00"), "Saver"
End Sub
This macro runs another macro in ten minutes called Saver. This is the macro that actually does the work; it looks like this:
Sub MAIN
FileSave
WordSave
End Sub
If you save these macros with a document, then they will always provide an AutoSave for that document. The AutoOpen macro is run when the document is first opened, and it runs WordSaver. WordSaver does nothing but run the Saver macro after ten minutes has elapsed. When Saver runs, it saves the active document, and then runs WordSaver again, which starts the ten-minute cycle all over.
There are a couple of drawbacks to these macros. First of all, there is no way to undo what is saved. With the regular Word AutoSave, you can always close a document without saving any modifications. The second drawback is that these macros will save whichever document is currently active--including one you might not have intended to save. Finally, if you save these macros as part of a template, then when you open a document using that template, ten minutes later a Save As dialog box will appear since your new document is not yet named.
Tip #1603 applies to Microsoft Word versions: 6 95
Take Control! Master the real power behind Word! Successfully master the secrets of powerful formatting and create documents that stand out from the rest. Best of all, you can create documents that are easy to maintain and quick to change.
Check out Word 2007 Styles and Templates today!
Have thousands of WordTips at your fingertips, on your own system. Answer your own questions or help support others. (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips