| Barry MacDonnell's
Toolbox for WordPerfect
Macros, tips, and
templates for Corel® WordPerfect® for Windows®
|Page updated Jul 10, 2013|
|UPDATER - Update a document with the current system's defaults, and also remove confidential information from the Undo/Redo History feature as well as all spell-checker skipped words from the Document Word List|
For a similar macro, download (Corel C_Tech) Charles Rosssiter's NewSave macro here.
For a similar macro for WordPerfect 6.1, see #UPDATE.WCM in the WP6.1 version of John Land's collections on the Other Authors page.
A macro to "update" the current on-screen document, or any selected file on disk, with the current system's default template settings. [N.B.: To do this for multiple files on disk, in batch mode, see Footnote 1.]
This is helpful if you want to -
The macro uses a simple trick to accomplish its task:
Simply play the macro. You are given the choice of updating the current document on screen or any file on disc. If the file on screen has been modified, you will be asked if you want to save the changes (you must save the changes if you want the macro to continue).
Need to update several (or many) files in one operation?
The "X-Retrieve" method described above can be used in batch mode by using two macros:
(1) A batch file processor such as DoFolder.wcm by Corel C_Tech Roy Lewis (main site: http://lemoto.myby.co.uk/mcMenFl.htm). (2) A simple variation of Updater.wcm, as below.
1. Copy (not move) all the files to be processed into a separate, empty folder. Do not open any of them, just leave them on disk.
2. Download Roy "lemoto" Lewis's DoFolder macro above.
3. Place both the DoFolder macro and the macro below in your default macro folder as shown in Tools, Settings, Files, Merge/Macro. (To copy the macro below into your WordPerfect and create a functioning macro, see http://wptoolbox.com/tips/CopyCode.html.)
4. Play DoFolder.wcm, the first macro, which will display a menu to let you choose the folder containing the files to process; then let you choose the name of the macro below (by whatever name you give it); and then it plays that second macro on each file in the chosen folder (step 1).
Be sure no other files are open when you play these macros.
// Macro begins:
// Get the path and filename of the currently open file:
// Close the file without a prompt:
// Open a new document:
// Reset the internal header of the current document:
// Insert the previous file:
// Save the file with its new header (overwrite mode):
// Close the file:
vDoFolderDone=True // (<= used with DoFolder macro)
// Macro ends