FACMAC Macro Utilities for WordPerfect 5.1 (U.S. DOS Version) Stand-Alone Macros Macro: Description/Special Instructions: ARROW Displays a menu of options for inserting arrowheads in your document. Can be used for bullets or to call special attention to something. Also works with Line Draw. BACKUP This macro works ONLY in conjunction with the PATHMAKR macro listed below. Backs up your directories to floppy. BORDER Creates a page border with a User Box. The user may select the type of border, e.g., thick or thin. The border is positioned « inch from the edge of an 8« X 11 page. BOXSRCH Searches graphic boxes for text without searching everywhere else; the type of graphic to search, i.e., Text, Figure, etc., is selected by the user. Faster than using Extended Search in many cases. BULLET For VGA monitors, displays a menu of bullet characters. Select the one you want and it's automatically inserted in your document at the current cursor position. As part of its function, this macro resets your display so that you can see everything in the WordPerfect character sets. This requires that you have the files S_TIBM.VRS, EGA.WCL and TWCLEGA.VRS in your WordPerfect directory. These files are available from the WordPerfect Corporation BBS by calling (801) 225-4414. This macro was written with my video card (IBM VGA) in mind, so it may not work with yours. If your monitor is different, you will probably need to modify it. Instructions for that are inside the macro. You'll need to know how to use WordPerfect's internal macro editor to read them. You must copy the file BULLET.DOC to the directory containing your WordPerfect program files to use this macro. CALENDAR Creates a one month calendar for any month and year in the twentieth century. Ever wonder what day of the week you were born on? What day does Christmas fall on next year? CAP1 After You Activate This Macro, Everything You Type Will Appear In Initial Caps, Like This. Press F1 To Cancel It. CAPPER Displays a menu of capitalization options and executes your selection. CAPSLOCK After you activate this macro, EVERYTHING YOU TYPE WILL APPEAR IN CAPS; YOU DON'T HAVE TO PRESS CAPSLOCK. PRESS F1 TO CANCEL IT. (Why not just press CAPSLOCK? Good question. This is probably only useful for macro writers who want or need to be able to control the case of keyboard input.) CASE Place your cursor on a letter, activate the macro, and it automatically switches the case. If it was small case, it'll become capitalized and vice versa. For efficiency, you should give this macro an alt- letter name. I prefer to use mnemonics, so alt-t (for transpose) works for me. CELLCOPY Allows you to easily copy the contents of a range of cells in one Table to another. Of course, you can also use it to copy the contents from one spot in a Table to another spot in the same Table. Make sure there's room before you start! CONVERT This macro converts abbreviations to their text equivalents. Unlike GLOSSARY, it's for use after you have created the document, i.e., it's a "clean-up" type of utility. Instructions for modifying it are inside the macro itself. You'll need to know how to use WordPerfect's internal macro editor to read them. COPY This macro works ONLY in conjunction with the PATHMAKR macro listed below and MUST be assigned an alt-letter name. It lets you easily copy files to your commonly used directories without having to remember (or type) long, complicated pathnames. COUNT Counts the ASCII characters in your document; does NOT count spaces. COUNTER This macro helps you improve your writing by eliminating redundancy. It counts each occurrence of a search string in your document. In other words, you can find out how many times you've used a certain word or phrase. COUNTPG Counts the actual pages in use. This is useful for writers who utilize WordPerfect's ability to number chapters/sections independently. DATE Temporarily displays the time, day of week, and calendar date on-screen. Probably best if assigned to an alt-letter combination. DATETEST This macro illustrates a technique for capturing the release date of WordPerfect into a variable, in this case Variable 1. You probably already know that the release date appears in the upper right corner of the screen when you press Help (F3). Macro writers occasionally need to know this information in order to control macro flow. For example, you can't use {SYSTEM}entry~ unless the user's version of WP is 6/29/90 or later. Unfortunately, there's no way to do this directly. Enter DATETEST. Macro writers should find it invaluable. EDITFIND After using the Compare Screen and Disk Documents feature, the macro locates all changes to the on- screen document and copies them to the alternate document window, e.g., Doc 2. EXIT Executes a fast exit from WP (or current document); automatically detects if the document is empty or previously saved. I recommend that you rename this macro to an ALT-letter combination, e.g., alt-X. EXEMAC Gives you "point and shoot" execution of all macros from the List Files screen. Highlight the macro you want to run, then press the spacebar to execute it. Since it runs from List Files, you never have to worry about updating a menu. It also "remembers" the last macro you ran so you can run it again quickly. FILE-UP If you use numeric filename extensions, this may be useful to you. It evaluates the current number of the extension and automatically increments it by one. This would be useful for people who need to keep track of the editing changes made to their documents. FIND-SPG From the current cursor position forward, locates any page break which is not "hard," i.e., was NOT created by pressing Ctrl-Enter. Used repeatedly, you can easily skim your documents for any or all occurrences of soft page breaks. This is a big help to anyone who needs to "lock" the formatting of a document. FIND-WPG Creates a list of the pages of your document which contain a graphic. The list is placed in a non- printing Comment. The graphic type is selected by the user. For writers of large documents, you can print using draft quality (fast) first, then go back and print only those pages with graphics which require a higher setting - a real time saver. FIXMAR One of WordPerfect's major limitations is its inability to search and replace specific formatting codes. Fortunately, many of these limits can be overcome using macros, which is what this one does. It performs a search and replace (with confirm) on margin settings and it works on both Line and Page margins. FIXQUOT Searches for quote marks like this " and optionally replaces them with typographical quotes, i.e., an open quote looks like 66 and a close quote looks like 99. Options include skipping a quote and replacing quotes in pairs. FRACTION Easy menu-driven method for putting commonly used fractions into your document that "look like" fractions. (Example: «) Note: For some fractions, you may need to print your document with the graphics quality set to High. GETCHAR Gets (finds and retrieves) characters from the WordPerfect character set as listed in the file CHARACTR.DOC. Instructions for modifying it for your system are contained within the macro. You'll have to access WordPerfect's internal macro editor to read them or make use of this macro. Note: Requires the WordPerfect Shell program. GLOSSARY This macro helps you become a "power" typist by letting you type using abbreviations. The macro then replaces that abbreviation with its definition. This macro should be assigned an alt-letter name. To see this in action, try typing "wpc", then pressing whatever alt-letter combination you chose for the macro. Try it again with "kf". Instructions for adding your own list of abbreviations are contained within the macro. You'll have to access WordPerfect's internal macro editor to read them or make use of this macro. GRAPHICS This macro lets you select a graphic type (Figure, Table, Text, User), a print quality (Draft, Medium, High), and then prints only those pages of your document which contain one of those graphics. KBMRG1 If you do keyboard merges, i.e., you enter data from the keyboard during a merge (also referred to as a form fill-in), you know how frustrating it is to have to "call" the primary document over and over. This macro lets you repeat a keyboard merge indefinitely; each iteration is separated by a hard page break. KBMRG2 This macro lets you do repetitive keyboard merges (like KBMRG1 above) but it saves each iteration (or cycle) of the merge in a separate file as you go. The first iteration is saved as DOC1, the second as DOC2, and so on. KBMRG3 This macro does what KBMRG2 does, but in addition to saving it also prints each iteration of the merge. LAUNCH Retrieves a document and, if a macro was stored with that document, executes it automatically. See LOADER below for more information. This would be particularly useful with template documents and commonly used merge primary documents. LINER Toggles the status display between inches and WP 4.2 units. LINES Counts the number of entries (lines) in a list. LOADER Stores a macro name "inside" a document. Use this when you want a macro to execute every time you retrieve that document. This is different than the /m startup switch which runs the same macro every time you start WordPerfect. It's more like the Date Code feature. With LOADER, each and every document can have its own "autoexec" macro. Use LAUNCH to retrieve them. LOGNEW This macro works ONLY in conjunction with the PATHMAKR macro listed below. It lets you easily change your current default directory without having to remember (or type) long pathnames or waste time searching your hard drive with List Files. Affects the current WP session only. MAC-ALL Executes a macro on all the files in a user-selected directory. You should be certain that the directory you indicate contains only WordPerfect files and ONLY files on which you're SURE you want the macro to "do its thing." MAKE-DB This is an "installation" macro. Use it to create your own PATHMAKR macro for use with the other macros in this collection which need it. You may use MAKE-DB as often as needed, whenever you make changes to your directory structure. MARK Tells WordPerfect to remember the cursor position before saving a file so you can quickly return to the same spot later. This macro uses Styles to do this WITHOUT cluttering up your document with a lot of unwanted "bookmark" codes. To pick up where you left off, use the RETURN macro listed below. MOVE This macro works ONLY in conjunction with the PATHMAKR macro listed below and MUST be assigned an alt-letter name. It lets you easily move files between your commonly used directories without having to remember (or type) long, complicated pathnames. NEXTPAGE Some WP users (notably the military) have indicated a need to number pages using the format 3/4 where the first number is the current page and the next number indicates the following page number. This macro will number pages that way, but it should be used after all editing has been done and will only work on documents (or sections of documents) with less than 44 pages. NOTATER Makes global changes to the format of reference notations in the form of (Reference, Date). You may add or delete commas in these references without disturbing any other text. NUMBER This macro helps users who need to use a sequence of incrementing numbers, e.g., creating a series of numbered invoices. Whenever you want the next number to appear, just run the macro again, provided you have not exited WordPerfect. Options include creating a "prefix" to the number, and resetting the current number. You will probably want to assign this macro to an alt-letter combination. OUTLINER Converts outlines created manually (using Tabs) to an automated WordPerfect "smart" Outline. P-EXIT Prints your current document, then automatically exits WordPerfect. Perfect for printing large documents when you're not even at your computer. Talk about productivity! PARABOX Automatically places a box around a paragraph (using Tables). Options include selecting line styles, e.g., single, double, thick. Automatically maintains paragraph spacing. PATHMAKR Database of pathnames. This macro MUST be customized to indicate your most frequently used directories. Directions for modifying it are included inside the macro itself. You'll have to access WordPerfect's internal macro editor to read them. Alternatively, use the MAKE-DB macro. It will ask you for the necessary information and then automatically build a new PATHMAKR for you. PG-PRINT Prints multiple pages in ANY order using WordPerfect syntax. (The built-in multiple pages option on the Print menu of WordPerfect only prints pages in ascending order.) PRINTCOP Monitors printing and signals when done. This macro is indispensable for those folks who print on a LAN and/or are some distance away from the printer. WordPerfect's background printing feature is unaffected. As soon as your print job clears WordPerfect's print queue, the macro signals with a beep. PRINTMOD This macro is designed to be used from within a keyboard layout (WPK file) and should be assigned to the Print (Shift-F7) key. When you press Print, your document will be saved automatically and you are then given the option to Spell Check before printing. For information on keyboard layout, refer to the WordPerfect manual in the section of the same name. PULLF5 Pulls all the files in your current directory into one document. Each "subdocument" is separated by a hard page break (Hpg). Allows you to quickly compile many different documents into one for easy editing, spell checking, etc. If you find yourself using this much, you should probably read up on WordPerfect's Master Document feature. QUOTE Combines a Search with automatic insertion of typographic quote marks. You tell the macro what to search for and it automatically surrounds it with quotation marks. Options include putting quotes around one word, two words, a user-defined group of words, and skipping a word. REPEATER Automatically repeats a macro the number of times specified by the user; when execution ends, reports the actual number of executions. REPLACE Automatically repeats a search and replace. RETURN Returns the cursor to the position stored by MARK. Refer to the explanation of MARK for information. SAVECOPY Saves the current document and then saves a copy to another directory. You must modify the macro to indicate the directory you want to use to hold your spares. Instructions for modifying it for your system are contained within the macro. You'll have to access WordPerfect's internal macro editor to read them or make use of this macro. Probably best if assigned to an alt-letter combination. SAVEMERG Saves each iteration of a merge to a separate file. Unlike KBMRG1, 2, and 3, this macro works with "normal" merges, i.e., merges using both a primary and secondary file. To use it, you must modify your primary file in a specific way. (Instructions for doing so are included inside the macro. You'll have to access WordPerfect's internal macro editor to read them or make use of this macro.) This causes the macro to be executed "automatically" when you run your merge. The files are named using numbers, i.e., the first file is named DOC1, the second is named DOC2, etc. SAVER This macro works ONLY in conjunction with the PATHMAKR macro listed above. This easy-to-use Save utility lets you quickly save files to your most commonly used directories without needing to remember (or type) long pathnames. It also includes an option for renaming. SEARCH This version of Search leaves the cursor at the beginning of the search object instead of the end. It could be assigned to the Search (F2) key, but since it only works in one direction (forward) and only on text, I recommend giving it an alt-letter name or leaving it as is. SEE-SRCH This version of Search also leaves the cursor at the beginning of the search object, but in addition it highlights the target briefly. SHADOW-B Creates a square shadowed bullet character like those which appear at the end of articles in WordPerfect Magazine. Best assigned to an alt-letter combination, e.g., alt-b for bullet. SHOWDATE Temporarily displays the day of week and date on- screen. Probably best if assigned to an alt-letter combination. SHOWTIME Temporarily displays the time on-screen. Probably best if assigned to an alt-letter combination. SPACEOUT Removes any and all leading spaces from each line of your document. Very useful after retrieving ASCII files. SWAPFONT Toggles between two pre-selected fonts. After you select the fonts, each time you run this macro it will automatically determine which font is in use and switch to the other one. Works on scalable and fixed pitch fonts or both. SWITCH Displays a menu of options for transposing words or letters and executes your selection. The words/letters must be on the same line. For letters, place the cursor directly under the first letter; for words, place the cursor anywhere within the first word. Best assigned to an alt-letter key. TABME Automatically replaces multiple spaces with a Tab code. Great for document cleanup when importing from other platforms, especially ASCII. Options include letting the user select the number of spaces to be replaced. TIMER Measures the execution time of other macros. Displays the start and end times in a non-printing comment box. Note: If the macro you want to check terminates with an untrapped error OR with a {QUIT}, TIMER will also be terminated. TOGGLE Creates a hot-key toggle between any graphics definition screen and View Document. Saves many, many keystrokes and makes editing graphics placement a lot less frustrating. It's especially useful when you're trying to make very small adjustments and you need to see the results as you go along. You MUST assign this macro to an alt-letter combination. After you activate it, press F7 to jump to the View Document screen; when you're done with that, press F7 again and you're automatically returned to the graphics definition screen you started from. VARIABLE Displays a menu of options for manipulating variables. Options include Assign, Clear, Get, and View. Works with either named or numbered variables. WORD2NUM Converts the numbers 1-9 to words and vice versa. WORKLOG Start this macro to begin recording your time on a project. Run it again when you're finished and it calculates the amount of time since you began working. Options include storing (logging) the elapsed time in a non-printing Comment. If you're a legl secretary, or anyone who needs to bill clients for your time, this one's for you! WPG-CAT Creates a hard copy (printed) catalogue of all WPG (WordPerfect Graphics) files contained in a user- selected directory. Options include selecting the number of columns to use, from 1 to 4. The width of the images is automatically adjusted to fit the number of columns selected and the height of each is set to maintain the correct proportions. This means that the number of images on each page will vary depending on each image's dimensions. The maximum number of images possible appears on each page within those limits. XLIST This macro MUST be assigned an alt-letter name. It lets you use List Files (F5) to select and then display files with two DIFFERENT extensions. It could easily be modified to display three, four, or more. A version of this macro appeared in my articleþþMagic Markers in List (F5)þþin the February 1992 issue of WordPerfect Magazine. FACMAC Macro Utilities for WordPerfect 5.1 (U.S. DOS Version) Keyboard Macros (KEN.WPK) Macro: Description/Special Instructions: Alt-Enter Retrieves the contents of {VARIABLE}~. (The variable with no name.) F5 This macro works ONLY in conjunction with the PATHMAKR macro listed above. It displays a menu of your most often used directories. Select one by pressing one of the highlighted letters and see your choice displayed in List Files (F5). Eliminates the need to remember (or type) long, complex pathnames. Shift-F7 This macro is designed to be used from within a keyboard layout (WPK file) and should be assigned to the Print (Shift-F7) key. For information on keyboard layout, refer to the WordPerfect manual in the section of the same name. When you press Print, you're given a message indicating the currently selected printer. From there, you may either go ahead with the print run or select a new printer. This macro would be useful for anyone who uses several different printers and forgets to select the right one. It's particularly effective in offices where multiple users with different printers are sharing document files. Ctrl-F2 Saves the document and then performs a Spell Check. One of WordPerfect's few weaknesses is the tendency to lock up during Spell Checks. By using the keyboard layout feature to assign this to the Spell (Ctrl-F2) key, you can protect yourself from this "bug" and avoid losing precious work. For information on keyboard layout, refer to the WordPerfect manual in the section of the same name. Alt-F10 To use this macro you must include it in a keyboard layout (WPK file) and assign it to the Macro (Alt- F10) key. When you press Macro (Alt-F10), you normally get the Macro: prompt. If you decide to use this modification, you'll get the same prompt but the last macro you ran will appear as a default. To run the default, press (Enter); to run a new macro, press (Backspace) and type the name of the one you want. That macro then becomes the new default. Alt-0 Displays the contents of {VAR 1} through {VAR 9}, the so-called keyboard variables available by pressing alt-number. Ctrl-F11 Enters a typographic open quote into your document at the cursor position. (It looks like 66.) Ctrl-F12 Enters a typographic close quote into your document at the cursor position. (It looks like 99.) Ctrl-A Displays the Advance menu, i.e., a hot-key to Format (Shift-F8), (4) Other, (1) Advance. Make selections in the normal way or press Cancel (F1) to return to the editing screen. Ctrl-F Displays the Base Font menu, i.e., a hot-key to Font (Ctrl-F8), (4) Base Font. Ctrl-H Displays a menu of Help options intended to assist macro programmers. Options include a display of {STATE} values, a list of all {SYSTEM} variables, and checking the contents of a {SYSTEM} variable. Works INSIDE the macro editor, too. Tab Displays a menu of tab options and then executes your selection. Lets you easily enter Hard Tabs, dot leader Tabs, Right Tabs, etc. This macro is designed to work from within a keyboard layout (WPK file) and should be assigned to the Tab key. Pressing the Tab key once enters an ordinary Tab code. Pressing it twice in succession displays the menu. For information on keyboard layout, refer to the WordPerfect manual in the section of the same name. Ctrl-I Turns italics ON or italicizes the current Block. Ctrl-O Turns off all Size and Appearance attributes currently in effect. Ctrl-Q Enters the new End Centering/Alignment code, i.e., a hot-key to Format (Shift-F8), (4) Other, (9) End Centering/Alignment. Ctrl-R Rewrites/reformats the screen, i.e., a hot-key to Screen (Ctrl-F3), (3) Rewrite, but it also eliminates the "phantom" margins which occasionally appear at the left of WordPerfect documents after making font or margin changes. Ctrl-S For VGA monitors, displays a menu of video display options and executes your selection. Options include setting the number of lines per screen to 25 (normal), 28, or 50. Also included is an option to select a video driver which allows you to see on- screen ALL of the 1500 characters available with Compose, i.e., the characters in CHARACTR.DOC. This requires that you have the files S_TIBM.VRS, EGA.WCL, and TWCLEGA.VRS in your WordPerfect directory. These files are available from the WordPerfect Corporation BBS by calling (801) 225-4414. This was written with my video card (IBM VGA) in mind and may not work with yours. If yours is different, you will probably need to modify it. Instructions for that are inside the macro. You'll need to access WordPerfect's internal macro editor to read them or use this macro. Ctrl-T Displays the Tab Set menu, i.e., a hot-key to Format (Shift-F8), (1) Line, (8) Tab Set. Ctrl-X Exits from anywhere in WordPerfect to the main editing screen. This one works better than the one which comes with WordPerfect because it's faster, doesn't "choke" when executed from the within the macro editor, and doesn't delete graphic boxes. - When you press the hyphen key, a hyphen is entered in your document as usual. Pressing it twice in succession displays a menu of Hyphen/Dash options. Options include hard hyphen, soft hyphen, normal hyphen, Em dash, and En dash. . Displays a menu of ellipses options and then executes your selection. This macro is designed to be used from within a keyboard layout (WPK file) and should be assigned to the period (.) key. Pressing the period key once enters a period as usual. Pressing it twice displays the menu. For information on keyboard layout, refer to the WordPerfect manual in the section of the same name. ` Displays a menu of quote mark options and executes your selection. Options include single left quote, single right quote, double left quote, and double right quote, all in typographic style. Ctrl-Bkspc This is an alternative to WordPerfect's Delete Word (Ctrl-Backspace). It does NOT remove the punctuation at the end of the word, thus it's very useful when deleting the last word in a sentence. If no punctuation exists, it performs exactly like Delete Word. For this reason, I recommend using it from within a keyboard layout (WPK file) and assigning it to the Delete Word (Ctrl-Backspace) key. For information on keyboard layout, refer to the WordPerfect manual in the section of the same name. Ctrl-en This macro is designed to be used from within a keyboard layout (WPK file) and should be assigned to the keystroke Ctrl-Down Arrow. For information on keyboard layout, refer to the WordPerfect manual in the section of the same name. When you press Ctrl- Down Arrow, the last two lines of the document move to the top of the screen so you can continue typing on a "clean" screen. Does NOT add lines, spaces, or anything else to the document.