"Ads by Goooooogle" links provided by Google.com, which has sole control over all advertising content it displays on this site.

Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2008 by Barry MacDonnell. All Rights Reserved.

Page updated Jan 3, 2008

MULTISAV - Macros to help automate saving documents

Download MULTISAV.ZIP (11/27/07; 38,938 bytes)

Compatible with WordPerfect versions 8,9,10,11,12,X3

WordPerfect 11 users: See important information about using macros in the first release of WP11 (11.0.0.233) at the top of this page.

Downloading, Documentation, Modifications, and Support

Also see these tips:

An alternative to the MULTISAV macros:

  • See the SaveCopy macro in the Library, which offers a way to save your currently opened file and simultaneously make an archive copy of it on another (alternate) drive using either the same relative directory (folder) name or a user-specified directory. The copy can also be made on a floppy disk.

Disclaimer:

All materials, including any software or software code contained herein, or that may be found on a related Internet site are offered without warranty or guarantee of any kind, either express or implied, including but not limited to implied warranties of merchantability, satisfactory quality, fitness for a particular purpose, non-infringement, or those arising by law, statute, usage of trade, course of dealing or otherwise, and are provided on an "as is," and "with all faults" basis. The entire risk as to the results and performance of these materials or software is assumed by you. The author assumes no liability whatsoever to you or any other entity or third party for any special, incidental, direct, indirect, or consequential damages -- including without limitation any damages to equipment, or for loss of profits, for business interruption, for loss of data or other information, or for any other loss arising out of the use or inability to use these materials, techniques, suggestions, or software programs, even if the author has been notified of the possibility or actuality of such damages, or they are foreseeable. Materials herein have been prepared with reasonable care for educational and informative purposes. No representations are made regarding the use or the results of the use of any materials contained herein in terms of their correctness, accuracy, reliability, or otherwise, and you are again cautioned that you use them solely at your own risk. You are advised to make backups of any important files before implementing any materials, including any macro, suggestion, tip, method, technique, or other item contained herein or that may be found on a related Internet site.

Contains three macros and a "read me" file:

NewFN#.wcm (v1.03)

"New FileName with Number" - Saves the current file with a new filename that has a numerical suffix appended to the root name (e.g., Myfile.wpd becomes Myfile001.wpd). Subsequent playing of the macro increases the filename's suffix (e.g., Myfile002.wpd, Myfile003.wpd, etc.) before saving. Thus you can easily save your current work-in-progress with sequential versions, or number letters to the same recipient, etc.

  • How it works: If the current file is a new (unsaved) file, the macro asks that you add a numeric extension to the filename and then saves it. If the current file has been previously saved with a numeric suffix (e.g., ClientX-004.wpd), it increments the numeric part of the filename and saves the file under the new name (e.g., ClientX-005.wpd). You can set the minimum length of the numeric suffix for the macro to use (and verify) in the redlined User Modification Area of the macro's code. (The default is three digits, which allows creating up to 999 versions of the file.) It then saves the current file with the same root filename as the previous file, but with the next number in the sequence appended to the root name.
  • Note: All backup files made with this macro are saved to the same folder as the previously edited/saved version of the file -- the same way that WordPerfect treats its own automatic backup files -- to prevent the possibility of accidentally overwriting a backup file (in a common backup folder) with another backup file of the same name.

Tips

Download MULTISAV.ZIP

Period+Save.wcm (v1.02)

Period("full stop)-plus-save - A macro to help automate saving files by saving the current file whenever you press the (".") key, unless the period follows a number, a space, or another period, in which case the macro will not execute a save.

Unlike NewFN#.wcm, it does not change the current filename.

Tips

Download MULTISAV.ZIP

HRt+Save.wcm (v1.01)

Hard return-plus-save - This macro makes special use of the backslash key ("\") to enter a hard return and save the current file at the same time.

Unlike NewFN#.wcm, it does not change the current filename. It simply saves the file the same as if you use File, Save.

Unlike Period+save.wcm, it is not completely "automatic": You must deliberately double-press the backslash key (after it has this macro assigned to the backslash key -- easy to do!). This might be preferred by some users to a completely automatic process.

The normal functioning of the backslash key -- i.e., one press of the "\" key followed by some other key press -- is not affected. You must press this key twice for the macro to spring into action. Otherwise, you will simply type a "\" into the document.

  • v1.01 adds the correct form of FileSave command to compensate for a bug in the macro language, plus other enhancements.
  • You should assign this macro to the "\" key. Then pressing the backslash key twice causes the macro to delete the backslashes, enter a hard return, and save the file. (Actually, any available key can be used; however, the backslash is normally located just above the Enter key, which makes it especially easy to use to enter a hard return and then save the file.)
  • You can also change the number of required backslashes in the macro code (see the top of the code).

Tips

Download MULTISAV.ZIP

Page Top

Which to use?

A Corel newsgroup visitor asked:

> If I also use NewFn#.wcm, will it work along with Period+Save.wcm?

Answer:

Yes.

Here is more on the operation of these macros to help you decided how to use them.

NewFN#.wcm is not automatic: It saves the current file only when you deliberately play the macro. (This is particularly easy to do if you assign the macro to a toolbar button next to the normal Save button.) As noted above, if it is a new document it will ask you for a filename -- one that has numbers appended to the root of the name (e.g., "MyFile001.wpd"). If you have already used Period+Save on that document, but have not yet appended a numeric suffix to the root name, NewFN# will pop a message and ask for one. It then saves the document under the new (now numbered) filename, and it will use that numbered name to create new, incrementally numbered filenames each time you play the macro. But you must deliberately play the macro!

It is meant to create several intermediate versions of a file -- "works in progress," so to speak -- such as MyFile001.wpd, MyFile002.wpd, and so on. This is handy when you want to save some sections of your original text as they were written, until the final draft of the document is written. (Of course, you can always clip the possibly unwanted sections to another document, using something like the Clipper macro. But that document is only temporary and must also be save to disk. If you don't mind the extra files on disk, NewFN# might be more useful, depending on your preference.)

Period+Save.wcm (like HRt+Save.wcm) is automatic -- if it is assigned to the period/full stop key and if the file has a name -- and will play whenever you type a period into the document (except, of course, periods preceded by a number, another period, or a space). If you are working on a new (i.e., originally blank) document it will pop a message to let you know you should save the document; once saved, you should not see the message again in that document. It always saves the document using the same filename and extension in effect at the time -- the same as if you use File> Save on any named document.

It is meant to help you save the same document more frequently than you might do otherwise, helping avoid loss of text if you absently close the program without saving many hours of work -- even if you have set the timed backup option (which, incidentally, works only for abnormal program termination, not for failing to obey warning messages about changed documents and the need to deliberately save or abandon those changes. See here for more on the timed backup feature).

Page Top

Tip #1
THE "PERIOD (FULL STOP) - PLUS - SAVE" TRICK
The rationale behind the
Period+Save macro above

If you want to save your work with sufficient frequency to minimize any potential loss and you don't like the backslash-key macro (HR+Save) method above, you could force WordPerfect to save the current file as you type, without having to remember to press a special key, or click a toolbar button or menu item. (This method can be toggled on and off; more on this later.)

A logical point to trigger a save with a reasonable frequency is when you press the period ("full stop") key. You could do this by creating a simple macro and assigning it to the period key so that it plays immediately whenever you press the period key. The macro would type the period and immediately save the file -- automatically. (If the file has not yet been saved, it will pop up the Save File dialog to allow you to name the file first.). Here's an example of such a macro (don't create it; please read on):

Type (".")
FileSave ()

Finally, you would assign this macro to the period key on your default keyboard.

Note: To assign the macro to the period [full stop] key, when you are in the Keyboard Shortcuts dialog (as explained in the assign link) you will need to check the box, "Allow assignment of character keys" to display normal keyboard characters; the period is just under the hyphen [-] and above the forward slash [/] in the list, for most keyboards.

Then every time you press the period key, the macro will play and type a period, then immediately save the file. If the file has not yet been saved, it will pop up the File Save dialog to allow you to name the file first.

With this macro, the most you are likely to lose if you forget to save before closing a file is one sentence. Other than using the WordPerfect automatic backup feature (Tools, Settings, Files, Doucment tab, "Save original file as a backup..."), this is about as automated a periodic save as you will get with WordPerfect.

[Note: Both methods -- using an auto-save macro and WordPerfect's automatic backup feature -- can be used together, if you wish. The WordPerfect automatic backup feature makes just one backup of the current file; however, this is a separate file from the current file, located in the same directory/folder but with a .BK! filename extension. The "period-plus-save" method saves the same file over and over: no separate backup file is created (unless, of course, you have the automatic backup feature turned on). And if you use WordPerfect's automatic backup feature, be sure to set it to 5 minutes or longer, as explained on the above-linked page.]

However, the simple two-line macro above has some limitations: It cannot tell if the cursor is located inside a "substructure" such as a dialog box -- a place where File, Save will not work. Also, it doesn't notice when you type ellipses ("..." or ". . ."), and it saves even when you are entering numerical data, which (slightly) slows such data entry.

The two-line macro above can be elaborated to

  • check if the period you want to type at the cursor location follows a digit, another period, or a space; and
  • check if the cursor is inside a a substructure.

If both conditions are true, the macro would not save the file, thereby avoiding potential problems with saving and reducing any (very slight) slowdown in your work. If both conditions are false, the macro would proceed to save the file.

A macro (Period+Save.wcm) that does these things is included as part of the MULTISAV.ZIP file on this page. It pops an information message in an unsaved or read-only document, and also does not auto-save the document when you are writing or editing a macro or template (most macro writers probably do not want frequent auto-saves while they code a macro). These two features can be changed with a simple setting in the macro's User Modification Area.

Related tips:

It may be best to assign the macro to the period key in a copy of your default keyboard. That is, instead of assigning the Period+Save macro to the default keyboard -- the one you use all or most of the time, such as <WPWin 11 Keyboard>, <WPWin 8 Keyboard>, <WPDOS 6.1 Keyboard>, etc. -- create a copy of the default keyboard definition, and use the copy when assigning this macro to a key. You can then use your mouse or a keystroke combination (see next paragraphs) to quickly toggle between keyboards, depending on whether or not you want to use the period-plus-save method of automating the saving of your files.

  • Click on Tools, Settings, Customize, then the Keyboards tab. Click the Copy button, then select the keyboard you want to copy (the "From" and "To" fields should be the default template file for your version of WordPerfect, such as "wp11US"). Click on Copy, then give the new keyboard a name (perhaps <Auto-save keyboard>). Click OK.
  • Back in the Customize Settings dialog, select the new keyboard, and click Edit. Check the box, "Allow assignment of character keys." Scroll down to the period (for most keyboards it's just under the hyphen [-] and above the forward slash [/] in the list), and choose it. Click on the Macros tab, then click Assign Macro to Key. Select the Period+save.wcm macro and assign it to the period key. (No need to save it with the full path if the macro is in your default or supplemental macros directory/folder.)
  • Click OK/Close until you are back at the main document screen.

Then -

  • Either right-click the Status Bar (the very bottom of the WP window that shows the names of currently opened documents) and choose Settings. When the Settings dialog appears, check the box, "Keyboard," then click OK. You can then click the keyboard icon that appears on the Status bar to slect the desired keyboard;
  • Or create two simple macros. Using them will require three fewer mouse clicks to change keyboards than the method above.
    • This method is almost as easy to set up. First create two macros (which are recordable with Tools, Macro, Record), then assign them to toolbar buttons or keystrokes -- one macro to select the new keyboard and one to select your default keyboard. That way, you can use your mouse or a keystroke combination to quickly toggle between keyboards, depending on whether or not you want to use the period-plus-save feature.
  • You can now use your mouse or a keystroke combination to quickly toggle between keyboards, depending on whether or not you want to use the period-plus-save method of automating the saving of your files.

Known Limitations:

The macro doens't work properly with the "As-U-Type" spell check and speed typing program, when a period follows a word that is in As-U-Type's Correction Database. If you use As-U-Type, just toggle it off temporarily with <LeftShift+RightShift>. Or use this tip from the author of As-U-Type:

'...To fix [this], please ... remove the period from As-U-Type's expander characters set: Right click the program's running icon and choose the "Options..." command. Then click the "Others" item on the left, and remove the period from the "Expanders" box on the right. (The Expanders box contains all characters which trigger expansion). Of course after removing the period from the box, As-U-Type no longer expands text when you type the period (so "admin." still stays as "admin.", while "admin," continues to be expanded to "administration,")....'

For more on As-U-Type -- which is otherwise an excellent program -- see http://www.asutype.com/.

Page Top

Tip #2
THIRD-PARTY SOFTWARE TO AUTOMATE BACK UPS

(See also Automatically make backups of your document to help you recover your work using a setting in WordPerfect.)

If you need real-time, automatic, or sequential backups of designated types of files, you might consider -

  • Centered Systems' SecondCopy (US $29.95) backs up (or optionally synchronizes and/or encrypts) saved files -- one copy of each, optionally compressed into a password-protected, standard ZIP file; it can also automatically move/store multiple older copies ("versions") in a separate archive; backups can be made on a user-defined time schedule or when files change.
  • VCom's AutoSave (US $49.99) makes an automatic, user-defined number of sequential back ups ("versions") of each saved file (or can synchronize them with another computer).
  • PC Magazine's InstaBack 2 (for Windows 2000, XP & Vista; download: US $7.97). "Instantly and Automatically Back Up Your Data" whenever you save a file in specified programs. InstaBack can also create multiple versions of backed up files by saving each new backup with a numerical filename extension. You can also do scheduled backups.

Page Top