浜様様様様様様様様様様様様 USEFUL MACROS FOR WORDPERFECT 5.X VERSION 2.0 藩様様様様様様様様様様様様 You won't find any macros that download the HeeHaw font to a Framis LaserSquirt Plus(tm) here. My aim is to provide a collec- tion of macros that do things the average WordPerfect user needs done (especially someone with a dot-matrix printer, which is most of us), save keystrokes (Sure you can have a macro called CLS that clears the screen for you, but that would mean typing - C L S , which is twice as many key presses as N N.), have (somewhat) mnemonic names, on the assumption that a macro isn't good for much if you can't remember how to call it (but see below MACS.WPM for some additional memory assistance), and are well documented and explained--here, below--so that you can get the maximum use of them. (The formatting of the above bulleted list was greatly simplified with the aid of ALTY.WPM in this set.) My main reason for putting this collection together was to make the abovementioned MACS.WPM, a macro-lister macro, avail- able. You will get the maximum benefit from the macros included here, if you have WordPerfect 5.X installed in its own directory on a hard disk. ----------------------------------------------------------------- ACKNOWLEDGEMENTS ----------------------------------------------------------------- First, I suppose we all owe thanks to the WordPerfect Corpo- ration for providing us with a word processor that allows us to get some serious work done and then adding the macro facility to make everything rather easier. I'm also indebted to many of my predecessors, whose macro collections I have downloaded and ex- amined for ideas. These include David Hunsaker, Alynn Rifkin, B. G. Katzung, Rich Bednarski, Alan Wright, and Gordon McComb. (Mc- Comb, a professional computer author, is evidently something of a programmer, as can be seen by comparing his macro CENTER.WPM with my CENLN.WPM. End user/stooge though I may be, my CENLN.WPM does about the same thing as his in fewer keystrokes, without your having to define a block, and it's written in much simpler, more straightforward terms. Several of the new macros in version 2.0 of this set, however, make extensive use of the Advanced Macro Programming Language.) I recommend Mr. McComb's work, in par- ticular his AUTOMERGE.WPM and his OUTLINE.WPM, which are extreme- ly clever. But since he includes copyright notices as comments in his macro definitions, none of his macros are reproduced in this set out of respect for his apparent wishes. For further information, see his WORDPERFECT 5.1 MACROS AND TEMPLATES, pub- lished by Bantam Computer Books. He has posted generous excerpts from this book and very good WP 5.X macro tutorials on RBBSs. As anyone familiar with macro collections on remote bulletin boards will surely recognize, my greatest obligation is to Alan M. Kaplan of Charlotte, North Carolina, who "taught" me how to use macros by means of his excellent set for WordPerfect 4.2. A number of the macros in this collection are similar to, if not the same as his. In fact, I wrote Mr. Kaplan to ask his advice concerning an envelope macro I was trying to create, and he was kind enough to respond at length, providing me with a very workable solution. (See PENV.WPM below.) I owe him special gratitude. ----------------------------------------------------------------- GENERAL PRINCIPLES ----------------------------------------------------------------- As suggested above, macros can make your work easier by saving keystrokes and simplifying formatting. You can also use them to "play back" keystrokes recorded as form letters or boiler plate. Bear in mind, however, that a macro can store no more than about one page (perhaps 5k). Nevertheless, it's possible to chain macros together, if you prefer not to bother with tem- plates. It seems to me that macros should not be used to allow your- self (or others) to forget normal WordPerfect command syntax. You'll need to know it in order to customize these macros, to make minor changes in formatting, and to write macros of your own. Imagine yourself eager to meet a sweet young thing at the office, but you have no real reason ever to speak to her. Then one day she says, "I was impressed by something I saw in a memo of yours, and I'd like you to show me how to do it in WordPer- fect." You sit down at her machine to demonstrate and . . . realize it's a macro on your system that does it--which she hasn't got, of course. And you have no idea of how to recreate the effect of it manually. The vast majority of the macros in this group should work on any system with whatever defaults are set. (My only Initial Code in Set Up is Just Off.) According to my best information, they all should work in either WordPerfect 5.0 or WordPerfect 5.1. (But, at this time, I'm still running 5.0.) However, some need personalization, while others will need to be modified because, for example, they look for directories you may or may not have in your tree structure. Some of these macros are designed to be repeatable; that is, the repeat function obtained by pressing makes them even more useful. For example, UCW.WPM will make all the letters of the word the cursor is in upper case, but if you want to capitalize all of five words in a row, then type 5 - UCW with the cursor somewhere in the first one. I'll make special mention below of macros possibly requiring modification and macros that are repeatable. (By the way, did you know you can make the default Repeat Value for the feature something other than 8 by pressing , the new number, and ? If you don't change it again, the new default remains in effect until you exit the program.) It's possible that a few macros in this collection may not work at all for you. For instance, if your dot-matrix printer does not do envelopes, no amount of modification to PENV.WPM will make any difference. It's assumed that you already have some knowledge of macro definition and the use of WP 5.X's built-in macro editor. If not, see the WordPerfect manual or Gordon McComb's publication cited above. One thing I'm sorry to have lost from WP 4.2 is the ability to create several different, simultaneously available temporary macros in one session. Sic transit gloria. But at least you can still make a single one, if a situation arises in which you'd otherwise have to type the same keystrokes over and over. Press - and, when prompted for a name, just hit . Also just hit when asked for a description. (You shouldn't need to describe something that's only temporary, although you can, if you want to.) Then define the macro as usual and hit - to complete the process. The tem- porary macro will run whenever you type - . It's saved on your disk as WP{WP}.WPM, and, guess what, it's not really temporary at all. Unlike the single-letter temporary macros in 4.2, it does not disappear when you exit the program. If you have to leave for any reason, it will be there still when you call WP 5.X again. Multiple temporary macros of a rather limited nature can be created by assigning variables to - combinations. These are mainly good for brief phrases of text that must be typed repeatedly in a given session. For example, if you need to say, "Except on Sundays and holidays" over and over, assign it to a variable by pressing -. The prompt "Variable:" will appear in the lower left-hand corner of the screen. Type "1," if you want to assign the phrase to the -1 combination. The prompt then changes to "Value:," at which time you type, "Ex- cept on Sundays and holidays" followed by . Now, whenever you press -1, that phrase will appear in your text at the location of the cursor. Variables will not hold most codes and can contain little more than a line and a half of text. Assignments also can be created by blocking existing text, pressing -, and supplying the prompt "Variable:" with a number. For a macro that generates assignments to all ten possible variables for you, see DCRITS.WPM below. The content of a variable becomes lost if you reassign its number to a different value or when you exit the program. It is possible to enhance the power of several of the macros in this group by linking them to DOS batch files. In this way, you can enter a single command at your opening prompt that will run WordPerfect and start a macro. First, you might have a WordPerfect batch file that looks something like this: ECHO OFF CLS CD \WP5 WP %1 C: CD \ CLS (If you are running MS- or PC-DOS 3.30 or above, you should sub- stitute @ECHO OFF for the first two lines above.) Call this batch file WP.BAT and put it in a directory in your path that precedes the WordPerfect 5.X directory. That way, DOS will find and execute WP.BAT before it reaches WP.EXE. Incidentally, this batch file has some other useful fea- tures: It makes \WP5 your current directory, which assumes you have a directory with that name. If not, substitute whatever you call your WP 5.X directory instead. Then it invokes WP.EXE with a replaceable parameter, %1; that is, if you type WP [d:][\sub- dir][filename] at your opening prompt (where d: = drive letter, \subdir = the name of a subdirectory, if any, and file- name = the name of a document you want to work on immediately), then WordPerfect will open with the file you specified on the screen. If you specify nothing, there's no error message nor any other penalty. When you exit WordPerfect, the batch file will resume running, log you back to your hard disk if you were else- where, change to the root directory, and clear the screen. Again, no penalty for already being in the root of C. Now comes the part where a batch file calls WordPerfect and opens the program with a macro. One macro in this collection, for example, DIRA.WPM, shows you the contents of the root di- rectory of a floppy disk in your A drive in the List Files screen. If that's where you'd want to be first upon starting the program, you can create a batch file that looks like this: ECHO OFF CLS WP /M-DIRA Name this DIRA.BAT and put it in a directory early in the path. What it does is to call the WP.BAT file shown above and feed it /M-DIRA as the replaceable parameter. /M-[macro name] is a spe- cial switch for WP.EXE provided by the WordPerfect Corporation that tells the program to open with a specific macro. Therefore, what you'll do, if you adopt this technique, is run a batch file that calls another batch file that tells the WordPerfect program to start up and run a macro. I should own up to the fact that there is a small price to pay for doing this. Each batch file, no matter how tiny, occupies a full data cluster on your hard disk, and a lot of them can occupy a good bit of space eventual- ly. But consider the advantages! I use this technique routinely with the following macros in this collection, among others: 2DOC.WPM MACS.WPM BLTR.WPM MEMO.WPM BLTRS.WPM MEMOS.WPM DIRC.WPM PLTR.WPM DIRA.WPM PLTRS.WPM ***PLEASE NOTE:*** In some instances, the names of these macros are not as mnemonic as I would have liked, for example, the already encountered ALTY.WPM. The Y doesn't stand for any- thing in particular; I just happened to have -Y defined as the black-box bullet in the late, lamented Character Map of WP 4.2. Feel free to rename these macros to whatever suits you, but bear in mind that a few of them invoke other macros. If the nested or chained macro within a macro is absent or has been renamed, then the macro that tries to call it will get terribly confused and quit. I'll try to alert you about such possibil- ities in the descriptions to follow. But first, . . . ----------------------------------------------------------------- THE STANDARD DISCLAIMER ----------------------------------------------------------------- These macros for WordPerfect 5.X are released to the public domain and ARE PROVIDED AS IS, WITHOUT WARRANTY OF FITNESS FOR WHATEVER PURPOSE. Most of them have worked on my system since I converted from WP 4.2, and they all have been tested, but USE THEM AT YOUR OWN RISK. Good sense would seem to dictate saving a file or even backing it up to a floppy disk before running any complex macro or doing anything complicated to it in WordPerfect. The copyright notice shown below is intended to apply only to the contents of this document, "Useful Macros for WordPerfect 5.X." 敖陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳 Copyright (c) 1991 by Richard Wexler. All rights reserved. 青陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳 If you experience difficulty, would care to volunteer some improvements, or have bug reports to deliver please feel free to write or call me: Richard Wexler 3906 Longfellow Street Hyattsville, MD 20781 1-301-779-6906 Bitnet: wexler@umdd.umd.edu Internet: wex@wam.umd.edu rw25@umail.umd.edu ----------------------------------------------------------------- MACROS IN THIS COLLECTION, DESCRIBED ----------------------------------------------------------------- (After reading this document thoroughly and determining whether or not you want to use these macros, copy them--or whichever ones you like--to the WordPerfect subdirectory on your hard disk. You may have used the Setup function's Location of Auxiliary Files menu to enable storing your macros in a different directory. If so, some of the macros in this set may or may not work. Frankly, I don't know if they will or won't, because I keep my macros in the same directory, which I call \wp5, as my other WordPerfect 5.X program files.) FORMATTING 1-2SPC Sets spacing at line. If you should decide to use your superscript font, which is probably your printer's condensed type style, to create, let's say, a disk label, the vertical spacing will still be the normal six lines per inch. This macro resets the line height to 0.5, which allows you to fit twelve lines in an inch of vertical space. 11-2SPC Sets spacing at 1 line. Sometimes double spacing squanders too much vertical space. This macro gives you about 4 lines per inch, rather than 3. 1SPC Restores single spacing after double spacing. Good for indented quotations, etc., in an otherwise double- spaced document. 2SPC Inserts code for double spacing into the file. ALTI Toggles the italic form of the base font on and off. To use this, type -I before whatever you want in italics, then type it again to return to roman type. (This macro is called by U2I.WPM, which will fail to work if you rename it.) ALTJ Turns Justification off. WordPerfect's default is to "justify" the right margin (make it aligned at the right). Orem's decision to do this was a mistake, pure and simple. Right justification is for proportionally spaced type styles only. In non-proportionally spaced fonts, like the ubiquitous Courier, the right margin can be justified only by adding extra space characters between words. To anyone with any typography, print- ing, or book-design experience, that looks like abso- lute hell, and it also makes the text more difficult to read. If you don't want to use the Setup feature to change the default and make [Just off] a permanent Ini- tial code, for heaven's sake, run this macro at the top of every document that will be printed in a non-propor- tional font. ALTL Go to left. When in columns, pressing -L will move the cursor one column to the left. (See ALTR.WPM below.) ALTN Successive paragraph numbering. ALTN.WPM takes advan- tage of WordPerfect 5.X's ability to number successive paragraphs automatically. Pressing -N will place an arabic number 1 at the left margin followed by a period and an indent. After typing the paragraph and hitting twice, pressing -N again will do the same, but with a 2. Subsequent calls of this macro will always result in the provision of the next higher number. Since the numbering is in coded form, deleting a paragraph results in the automatic renumbering of all paragraphs that follow. In order to make this work, you must change WordPer- fect's numbering default from Outline (I., A., etc.) to Paragraph. The most efficient way to do this is to use the Setup function to make the change permanent. (Aren't you far more likely to create sequentially num- bered paragraphs than a full-scale outline in your day- to-day work?) Press - and select 5 - Ini- tial settings from the menu. Then choose 4 - Initial codes from the submenu. You should now find yourself in a screen similar to the Reveal Codes screen. Then press -, choose 6 Define, and select 2 - Paragraph in the definition screen. The code "[Par Num Def]" should appear below the ruler when you return to the Initial codes screen. Press to save your new setting and return to your document. You're now ready to use ALTN.WPM whenever you're in WordPerfect. (See also NN.WPM, RN.WPM, and TABS4.WPM.) ALTR Go to right. When in columns, pressing -R will move the cursor one column to the right. (See ALTL.WPM above.) ALTS A toggle, as in ALTI, but for superscript. ASCII Sets both margins to 0" and starts the - Text In function, in order to facilitate retrieving a down- loaded ASCII file for, for example, reformatting it prior to printing it out. ASCII2 Same as ASCII.WPM, but leaves both margins at 1" in the event that no line has more than 65 characters and it would be desirable to have 1" margins. ASCIICNV If you wish to convert an ASCII document with [HRt]s to a WordPerfect document with [SRt]s, this macro will do it, provided that the document is in normal paragraph format. ASCII documents formatted with a lot of empty space--that is, with numerous space characters--will not convert readily. ASCIICNV searches the two [HRt]s that normally separate paragraphs and temporarily replaces each pair with a [HPg]. Then it searches and replaces all single [HRt]s with a space, searches and replaces all double spaces with a single space, searches and replaces all periods followed by single spaces with periods followed by double spaces, and finally searches and replaces the temporary [HPg]s with two [HRt]s. The macro ends with the cursor at the top of the converted document. To keep the process from being interrupted, ASCIICNV.WPM calls HYPHX.WPM to turn hyphenation off. BLTR BLTR stands for "business letter." This macro leaves space at the top for a letterhead, puts the current date at the right, and ends left, at the point where an inside address would begin. CLSNG.WPM is related to BLTR. BLTR attempts to make a:\bltrs the current directory, so that your business letters are saved to their own location on a floppy in drive A by default, keeping your hard disk from being cluttered up with correspondence. You'll see one of DOS's fondest error messages, if you have no floppy in drive A when you call BLTRS. (Even if you hit retry, the macro will still fail to run.) Likewise, the file won't be saved where you want it, if there isn't any \bltrs subdi- rectory on the diskette. If you don't care for this idea, feel free to use the macro editor to delete everything in the first line of the macro except {DISPLAY OFF}. (See BLTRS.WPM below.) BW Bolds the word the cursor is in. This is one of those macros that can be used in combination with to make several words in a row bold. There is one disad- vantage to doing this, however, which is that each word will have its own [BOLD][bold] code pair. If this becomes seen as a problem (for example, the file con- tains too many bytes to fit where you want to store it), you can always Search and Replace the superfluous codes selectively, with confirmation on. BX Removes the next bold code after the cursor. This macro is designed to be repeatable using the repeat function. CAPLN Capitalizes all letters in the line the cursor is in. Use to repeat this macro for multiple lines. (There will be no extra codes.) CENLN Centers the line the cursor is in. Use to repeat this macro for multiple lines. (Each line will have its own centering code, but that's standard operating procedure for WordPerfect.) CLSNG Supplies a standard closing with title for a business letter. When used in conjunction with BLTR above, the "S" of "Sincerely yours" aligns with the first letter of the month in the date. In order to have your name and title in this macro, you must revise it in the macro editor. CPB Copies blocked text. Block any amount of text, run the macro, cursor to where you want the copy inserted, and press . The text that was blocked remains at the old location and is reproduced at the new one. (See also RT.WPM below.) CPP Copies the paragraph the cursor is in. Run the macro, cursor to where you want the copy inserted, and press . The paragraph remains at the old location and is reproduced at the new one. (See also RT.WPM below.) CPS Copies the sentence the cursor is in. Run the macro, cursor to where you want the copy inserted, and press . The sentence remains at the old location and is reproduced at the new one. (See also RT.WPM below; guess what I'm using to repeat this phrase so many times.) CTB Cuts blocked text. Block any amount of text, run the macro, cursor to where you want the text reinserted, and press . The blocked text is removed from the old location and pasted into the new one. (See also RT.WPM below.) CTP Cuts the paragraph the cursor is in. Run the macro, cursor to where you want the paragraph reinserted, and press . The paragraph is removed from the old location and pasted into the new one. (See also RT.WPM below.) CTS Cuts the sentence the cursor is in. Run the macro, cursor to where you want the sentence reinserted, and press . The sentence is removed from the old location and pasted into the new one. (See also RT.WPM below.) DBLUND Turns on double underlining, pauses for text entry, then turns off double underlining when is pressed. DHPG Deletes all hard page codes in a document. This is handy for reformatting a secondary merge file or for changing the pagination of a downloaded ASCII document that has something other than WordPerfect's default number of 54 lines per page. DHRT Deletes all hard returns, but asks you about them one by one first. Hard returns can be so critical to the orderly appearance of a document, that it's probably wise to consider each one before sending it to the bit bucket. (See also ASCIICNV.WPM.) EDFN Edit the first footnote following the cursor. Put the cursor anywhere in your document that's before the footnote you want to edit but after the previous one. EDFN.WPM will take you immediately into the footnote editing screen with the footnote you wanted to change in it. EDHDRA See HDRA.WPM. Goes to the top of the document and brings up an existing Header A in the header editing screen. This macro loops while waiting for . When you finish editing the header, pressing will take you directly back to the main editing screen without your seeing several intervening menus. ENDNOTES Converts a footnote to an endnote. This one should be used with ; if you specify a ridiculously high Repeat Value after pressing , the macro will quit after processing the last footnote regardless. (See FTNOTES.WPM.) EXTP Extends the number of lines on the page (and on sub- sequent pages, unless changed back) from 54 to 58. FN Begin creating a footnote at the cursor. FN.WPM takes you straight into a blank footnote editing screen, where you can create a new footnote. The note's number will appear in the main text wherever you left the cur- sor when you called this macro. FTNOTES Converts an endnote to a footnote. This one should also be used with ; if you specify a ridiculously high Repeat Value after pressing , the macro will quit after processing the last endnote regardless. (See ENDNOTES.WPM.) GRID Simulates computer grid paper by redlining every other line. I've had occasion rather often to make a list in columns on which entries needed to be read in horizon- tal rows. Such entries can be difficult to follow if the rows aren't differentiated, but I don't want to stock grid paper and fumble around changing from one type of paper to another. This macro gets the printer to make the grid on plain paper, if you have the kind of printer that interprets redlining as overstruck shading (which it happens I do). Use the key to repeat the macro according to how many pairs of rows there are in the document. The output looks best if each row is padded with blanks to the right margin for an even appearance. HANG Creates a hanging indent, as in a bibliography entry, with the first line at the left margin and the sub- sequent lines indented (until the next hard return). HDRA Creates Header A, waits for text entry, suppresses on first page. You should run this macro on the first page of a document. HDRA.WPM takes you into a blank screen for making a header that will begin at the upper left-hand corner on each page of a printed document. This macro loops while looking for you to press , which means your header can have as many lines separated by [HRt]s as you wish. After you press to exit the header screen, the macro adds code to your document for suppressing the appearance of the header on the current page, and takes you directly back to the main editing screen. You will not be able to see the header on the editing screen. It will only appear either when you print or when you look at the document using the View document feature (see ALTV.WPM below; see also EDHDRA.WPM above). However, you can see an indication of its presence in your document in the Reveal Codes screen. By the way, if you wish to have successive page numbers as part of your header, press -B where you want the page number to appear. WordPerfect substitutes the number of the current page for what looks like ^B in your header. HEADER For use with BLTR or PLTR. HEADER captures the first line of an inside address and makes it the first line of a Header A. The second line is the page number, and the third is the date. All pages but the first will contain this header. The macro adds a comment to the top of the file reminding you that the header command is in it. To run this macro, place the cursor in the space above the first letter of the first line of the inside address and type - header . (This is one of the brightest and most original of A. Kaplan's many gems.) HYPH Turns the hyphenation feature on. This works whether you are using the regular feature built into the main program file or the special hyphenation program available from the WP Corp. as an add-in. HYPHX Turns the hyphenation feature off, if it's driving you bananas with its constant beeps and requests to posi- tion the hyphen and press . Sorry, folks, but the optional add-in works only marginally better than the standard feature. Many people keep hyphenation off when composing a document and then return to the top, turn it on, and place all the hyphens in one pass back through. (Many other people never use hyphenation at all, which looks like hell to me.) (This macro is called by several others that could fail if it's absent or renamed.) I2U Converts all italicized text in a document to under- lined text. David Hunsaker implemented this slightly differently, but with the same results. I needed this, because I have a printer at work that doesn't do ital- ics (thank you, Big Blue), while my printer at home does them semi-wonderfully. (When are printer manufac- turers going to learn what a real italic face looks like?) IW Italicizes the word with the cursor in it. This macro is repeatable, but each word will have a separate [ITALC][italc] code pair. LC Makes the first letter of the word with the cursor in it lower case. May be repeated with for as many words in a row as needed. LCW Converts a word completely in upper case to lower case. May be repeated using for as many words in a row as needed. LM Prompts for a new setting of the left margin, but leaves the right margin intact. (See RM.WPM.) LRM Prompts for new settings of both the left and the right margins. (See LM.WPM and RM.WPM.) MEMO Creates a standard memorandum, with pauses for your text entry after TO: and RE:. You will have to alter this in the macro editor either to leave room for a letterhead or to provide a heading, and to put your own name after FROM:. The date is inserted automatically. MEMO.WPM looks for a subdirectory on a floppy in drive A named \memos. See the discussion of BLTR.WPM above for what to do about that in similar circumstances. If you don't care for this idea, feel free to use the mac- ro editor to delete everything in the first line of the macro except {DISPLAY OFF}. (See MEMOS.WPM below.) MEMOHDR This macro places a three-line header on the second and following pages of a multi-page memorandum. The first line consists of the subject, the second is the date, and the third is the page number. Before running MEMO- HDR.WPM, place the cursor UNDER the first character of the memorandum's subject (that is, after "RE:," if you're using my MEMO.WPM). MEMOHDR.WPM also puts a non-printing comment at the top of the document to re- mind you that the header is there. NN If you're a stickler for appearances (and I guess I am), it can be annoying for the alignment of the periods to change when you go from single to double digits in a numbered list. If you're employing WP's automatic paragraph numbering feature, use ALTN.WPM to go from 1. to 9. and then switch to NN.WPM for 10. and up, and you'll have the periods aligned. This macro uses the margin release feature to put the first of the two digits one space to the left. (See also RN.WPM.) OBLFRMT This will work only on a wide-carriage printer. OBLFRMT sets codes for printing oblong on standard size paper. PBRK Frequently, when you're looking at a printout, you notice odd things right around a page break ([SPg]). But when you "Go to" the page normally, the break is just above the top of the screen. PBRK.WPM prompts you for the number of the page to go to, then puts it near the center of the screen and leaves you in Reveal Codes with the cursor on [SPg], where you can see what's going on. PLTR Sets up a personal letter with return address and current date on the right and ends where the inside address or opening salutation would begin on the left. To use this macro, you must use the macro editor to insert your return address. As with BLTR.WPM above, this macro attempts to make a subdirectory, in this instance \pltrs, on a floppy disk in drive A the cur- rent directory. See the discussion of BLTR above for how to handle this feature. If you don't care for the idea, feel free to use the macro editor to delete everything in the first line of the macro except {DISPLAY OFF}. (See PLTRS.WPM below.) PNO Puts a page number, -#-, in a footer at the bottom cen- ter of every page in a document, starting with page 2. Because this macro creates "hard" page numbers, perhaps you should use it as the last step in preparing a docu- ment. PRPTLSPC Changes to the proportional font (but only if your printer can do proportional spacing) and turns on Jus- tification and the Widow/Orphan prevention feature. REHYPH Sometimes, as you're hyphenating on the fly while drafting a document, you don't get it quite the way you want it. This macro deletes all hyphenation and reruns the hyphenation feature, allowing you to consider the placement of the hyphens one by one a second time. RM Prompts for a new setting of the right margin, but leaves the left margin intact. (See LM.WPM.) RN Restarts automatic numbering over again with 1. In some documents, you might like to have more than one numbered list. If you use automatic numbering, you can't start again from 1. unless you go into Para Num of the DATE/OUTLINE feature and reset things. RN.WPM takes care of that. (See also ALTN.WPM and NN.WPM.) RT Finally, the ever-popular RT.WPM: When you use the Move or Copy functions on - (or in the macros CP* and CT* above), the copied or cut text is placed in a temporary file until you move the cursor and press . (That's what the WP manual says, but I sus- pect it's really a buffer, since I can't find any such file in the working directory.) The first time you hit , you get the text back, but after that reverts to its normal behavior. The text is still there in limbo, or wherever, and can be retrieved by starting up the Move function again and selecting 4 on the menu. Or use RT.WPM, which does the same thing. (P.S.: RT stands for "ReTrieve.") S2HRT Converts all [SRt]s (soft returns) in the document on the screen to [HRt]s. You also can do this by saving a file as ASCII text, but you'll lose a whole lot of other kinds of formatting that way. This can be a use- ful way to stabilize everything in a shakily formatted file you don't intend to edit further. SB Turns subscript feature on, pauses for text entry, upon turns subscript off. (Analogous to ALTS.WPM for superscript, but not a toggle.) TABS At times, you might wish to change the Tabs settings for a particular purpose in one relatively small por- tion of your document and then return to normal Tabs. TABS.WPM resets a tab stop at every half-inch mark. TABS4 Since I'm persnickety about such things, I prefer two spaces after the period following a number. WordPer- fect's default tab setting, every .5", gives you three (if the font is 10 characters per inch, as seems normal for most of us). This macro sets tabs every .4" I generally take a moment to run this macro before using automatic paragraph numbering with ALTN.WPM. U&B Pauses to allow text to be blocked, then both under- lines and bolds it. U2I Converts all underlined text in a document to ital- icized text. (See I2U.WPM above.) UC Capitalizes the first letter of the word with the cur- sor in it. May be repeated using for as many words in a row as needed. UCW Makes all the letters in the word with the cursor in it upper case. May be repeated using for as many words in a row as needed. UNDLSPC Adds code that enables the underlining of spaces. (Sometimes you really do want an entire expression underlined, spaces and all.) UW Underlines the word with the cursor in it. May be repeated using for as many words in a row as needed; but this is another, like BW.WPM, that adds numerous superfluous code pairs, in this instance [UND][und]. UX Removes the next [Und] (underline) code after the cursor's location in the document. This macro can be repeated using . WO Puts a Widow/Orphan Protection code at the top of the document. SYMBOLS In WordPerfect 5.X, the Character Map of old has been replaced by thirteen Character Sets, accessed by means of pressing -2. The exact syntax for any particular character can be completely unmemorable, and most dot-matrix printers are not able to do much more than the ASCII and extended ASCII characters anyway. (Word- Perfect 5.1 has the ability to create bit maps of characters dot- matrix printers ordinarily can't produce, however.) Printing out CHARMAP.TST on the Conversion diskette will show you your print- er's capabilities. Be prepared for an unpleasant surprise; In WordPerfect 5.0, mine can't do ANY of Maps 9, 10, and 11, for example. However, you can "compose" the common ASCII characters with diacritical marks at the keyboard; for example, the letter u with an umlaut for German is -2 u, as in . (See further Compose in the Reference section of the WP 5.0 manual, p. 105f.) Therefore, composing such a character is not much more difficult to accomplish than running a macro that creates it would be--but no easier either. You can take up a lot of the available - com- binations dedicating them to making , , or , so you might as well go ahead and use -2. Several of the following macros illustrate how you can automate the creation of symbols that are not easy to make with the Compose feature. But for a quick way of putting any character in the ASCII set into your document, see ASC.WPM below. See also the macro DCRITS.WPM that assigns some of the most common letters with diacritical markings to variables for use in typing French and German. (C) The main default font of my dot-matrix printer (a NEC P2200, as it happens) includes a copyright symbol. You should be able to determine from your printer test doc- ument, if your printer has the capability of producing this symbol. If not, WordPerfect 5.1 might well be able to create a bit map of it that can be sent to your printer. This macro causes a black box to display on the screen, but a c-in-a-circle appears in the printed document. (R) One of the fonts, not the main default font, of my dot- matrix printer has an r-in-a-circle registered mark. If I change to that font, this macro causes a black box to display on the screen, but an r-in-a-circle appears in the printed document. ALTB WordPerfect displays a black bullet box, but a white box prints. The entire paragraph is formatted as in the bulleted list at the top of this document. (See also ALTC.WPM, ALTW.WPM, and ALTY.WPM.) ALTC WordPerfect displays a black bullet box, but a round black bullet prints. The entire paragraph is formatted as in the bulleted list at the top of this document. (See also ALTB.WPM, ALTW.WPM, and ALTY.WPM.) ALTH Displays and prints . ALTM A common way to make a dash on a computer is to type two hyphens in a row. Some of us more finicky types would prefer something more like a real printer's em dash (a solid horizontal line, centered vertically in the space, about the width of a letter M). ALTM.WPM supplies one hyphen, advances the printer left .04", and adds a second hyphen. The screen will continue to show a separation between the hyphens, but you can see the effect of the [AdvLft] command in the appearance of the number following Pos on the status line. ALTO Supplies a (ASCII 248 decimal) for the degree sign. ALTQ Displays and prints . ALTW WordPerfect displays and prints a round white bullet. The entire paragraph is formatted as in the bulleted list at the top of this document. (See also ALTB.WPM, ALTC.WPM, and ALTY.WPM.) ALTY WordPerfect displays and prints a black bullet box. The entire paragraph is formatted as in the bulleted list at the top of this document. (See also ALTB.WPM, ALTC.WPM, and ALTW.WPM.) ASC Uses the Show feature to display the ASCII character set. Yes, you can use WP 5.X's Compose feature to ac- cess all the characters your printer is capable of do- ing, but you have to remember its exact location on one of WP's twelve Character Maps. Think you're going to remember where a Greek pi is, if you need one? (It's on Map 8 at position number 33.) You can still put a pi in your document using the time-honored trick of holding down the key, typing pi's ASCII decimal number on the numeric key pad, and then letting go of the key. Look: . The keystrokes for that were -227. But you still need an ASCII chart to find out that 227 is the decimal number for pi. (Be reason- able. It couldn't be 314, because ASCII numbers only go up to 255.) ASC.WPM brings up an ASCII chart in the Show feature of WordPerfect's List files screen that has been specially formatted to fit Show's display. The Show feature does not interfere in any way with whatever is in either Doc 1 or Doc 2 on your editing screen. After you have lo- cated the ASCII decimal number of the character you want to put in your document, press twice, and you will be returned to your document where you left the cursor. There may still be many characters your print- er can do that are not in the full ASCII character set, but at least you won't have to consult print-outs of Character Maps or the WP manual just to get a standard ASCII character in your document if you use ASC.WPM. BOX The white box character used in ALTB above is very much on the small side and would not serve well as the box in a checklist. BOX.WPM creates a box that's as much as four times larger or more using Line Draw. However, Line Draw is not intended to line up with text in this manner, so I've had to use the Advance Up function to force the alignment. Since Advance is in the nature of a printer command, the proper alignment doesn't display on the screen, but if your printer can draw lines and advance up and down, your checklist will look right printed. To make a checklist, count the number of items in the list, press , then run BOX. WordPerfect will pause after drawing each box for text entry. (See also CHK.WPM below.) CHK Suppose you'd like to have a nice printed check in several of the boxes you've made with BOX.WPM above. CHK.WPM allows you to add one, using ASCII character 251 decimal. Before running this macro, center the cursor under the box. DCRITS This macro assigns the most common combinations of letters and diacritical markings needed for typing French or German to the ten possible variables, as follows: Var 1 , Var 2 , Var 3 , Var 4 , Var 5 , Var 6 , Var 7 , Var 8 , Var 9 , and Var 0 . It also puts a non-printing comment on the screen contain- ing a chart of what the assignments are as a reminder. You can run the macro repeatedly to keep the chart on the screen near where you're typing. The variables will simply be replaced with the same values each time, and the accumulated comments can all be deleted simul- taneously with the macro DCOM.WPM when they're no long- er needed. DCRITS.WPM can serve as a template for any macro that assigns variables, as you wish. First copy the macro to a new filename with the extension .WPM and use the macro editor to change the values in the assignments (whatever lies between the tildes [~] after {ASSIGN}). Then change the text in the comment (or delete it), as required. OVR Use this macro to combine any two symbols in the same space of a printed document. (I use it, for example, to combine ASCII 67 and 179 decimal for a pretty good "cut C" musical time signature.) It runs the over- strike feature, pauses for the entry of both charac- ters, and then returns you to your document. Only one of the characters will display, but you can more or less see the true state of affairs in Reveal Codes or View Document. SHDDBOX Forty-three-character wide, centered box, shaded on right and bottom. This macro is really only intended for demonstration purposes. It uses WP's Line draw feature to create a box that can have a two-line title placed inside it using Typeover. You can do about the same thing using WP 5.X's excessively cumbersome Graph- ics Text box feature. But even after all the hassle, you won't be able to see the results in the editing screen. Too bad WordPerfect Corporation couldn't im- plement the feature more like this. FILE/MACRO MANAGEMENT BLTRS This presupposes the existence of a \bltrs subdirectory on the diskette in drive A. It makes a:\bltrs the cur- rent directory and shows its contents in the List Files screen, where you can select the piece of correspon- dence you wish to "Look" at or retrieve. If you object to having to type an extra N to activate the Name Search feature as much as Alan Kaplan does, add an N to the end of the macro. BLTR and BLTRS both gain a lot from being linked to DOS batch files, as described above. (See BLTR.WPM above.) DIR5 If you have made a subdirectory other than the WordPerfect subdirectory the current directory, DIR5 restores c:\wp5 to default status. If your WP 5.X directory is not named \wp5, you'll need to alter this macro in the macro editor. DIRA Brings the contents of the root directory of a floppy diskette in the A drive up in the List Files screen. Since a:\ does not become the default directory, this macro is basically for reference. However, any file in the list can be retrieved, and its proper pathname will appear on the WP Status Line. To make a:\ the current directory after DIRA finishes running, type 7 . To make a different directory on the diskette current, highlight its name before pressing 7 . If some other directory on the floppy in drive A was already current in DOS before you ran DIRA, you'll see a list of that directory's files when you call this macro. This macro gains considerable power by virtue of being linked to a DOS batch file, as discussed above, named DIRA.BAT. DIRC Brings up c:\wp5 in List Files without changing to it. If your WordPerfect 5.X program directory has a dif- ferent name, then you will need to alter this macro in the macro editor. In fact, MACS.WPM (perhaps the pice de rsistance in this set) calls DIRC.WPM and will not function properly unless the name of your WordPerfect 5.X directory is correct. This macro is useful, if you're working in a different directory and you want to see what's going on in your WP program directory with- out necessarily logging to it and making it current. As before, this macro gains considerable power by vir- tue of being linked to a DOS batch file, as discussed above, named DIRC.BAT. MACS Uses the Look function on the menu in the List Files screen to put an alphabetized list of the macros in this set, with a one-line description of each, on the screen. No, sorry, you can't "point and shoot" to run a listed macro, but you don't have to clear the screen either to see the list, since Look does not disturb the document on the screen. (Also, this macro does NOT use the Doc 2 screen, messing up whatever you might have had there, as does another macro lister I've reviewed.) When you're finished reminding yourself what a macro's name is or what it does, press twice to return to your document where you left the cursor. Since the list is an everyday WordPerfect 5.X document named MACS.DOC, you can edit and save it again freely. Use ALTK.WPM, described below, to delete the lines of any unwanted macro in this set. You can also add as many lines as you like for your other macros. The simplest way to edit the list, rather than just Look at it, is to call MACS.WPM. Then type once followed by 1 (to retrieve it). But be sure there's no other doc- ument already on the screen when you want to edit it or you'll have a mess to undo. Please note that I didn't use a Tab character to provide the space between the macro name and the macro's description. The title contains a date code, so that its appearance in a hard copy will always reflect the state of the list as of the day you last printed it out. The list is formatted with a header for printing on standard 8" x 11" paper. (Or at least I think it is; you never know if someone else's printer will work the same as yours.) The next time you say to yourself, "Wait a minute, I think I have a macro somewhere that does that," you can iden- tify it quickly. MEMOS This macro presupposes the existence of a \memos subdirectory on the diskette in drive A. It makes a:\memos the current directory and shows its contents in the List Files screen, where you can select the memorandum you wish to "Look" at or retrieve. If you object to having to type an extra N to activate the Name Search feature as much as Alan Kaplan does, add an N to the end of the macro. MEMO and MEMOS both gain a lot from being linked to DOS batch files, as described above. (See MEMO.WPM.) PLTRS Again, this presupposes the existence of a \pltrs subdirectory on the diskette in drive A. It makes a:\pltrs the current directory and shows its contents in the List Files screen, where you can select the piece of correspondence you wish to "Look" at or retrieve. If you object to having to type an extra N to activate the Name Search feature, add an N to the end of the macro. PLTR and PLTRS both gain a lot from being linked to DOS batch files, as described above. (See PLTR.WPM.) MISCELLANEOUS 1DOC Restores screen split between Doc 1 and Doc 2 to full screen (in whichever document it's run). The document in the other screen is not disturbed but is no longer visible. (See 2DOC.WPM below.) 2DOC Splits the screen equally between Doc 1 and Doc 2. (I'm using this right now to draft READMEIN.ASC while viewing MACS.DOC in the lower half of my screen, making sure they're consistent with one another.) Fairly fre- quently, I want to start WordPerfect with the screen divided for editing two files simultaneously or for moving text from one to the other, so I've linked 2DOC.WPM to a DOS batch file named 2DOC.BAT, using techniques described in full above. (See also 1DOC.WPM, MB.WPM, MP.WPM, MS.WPM, SCRLLDN.WPM, SCRLL- UP.WPM, and RT.WPM.) ALTA Copies text through next Hard Return and reproduces it immediately below. (Let's say that the "A" in ALTA stands for "again.") I have found this macro handy for lists having the same, or nearly the same entry (such as "Not applicable") several times in a row. Put the cursor somewhere in the first line of the text to be reproduced. There has to be a Hard Return at the end of what you're trying to duplicate, or ALTA.WPM won't work. ALTD Calls SCRLLDN.WPM (see below), which allows you to scroll down one line simultaneously in Docs 1 and 2, with a repeat value of 10. If you are using the macro 2DOC.WPM (see above), ALTD scrolls you down a whole screen in both Docs, which can be handy if you're trying to compare the contents of two similar files. In order for this to work correctly, the macro should be started with the cursor at the bottom of the screen in both documents. ALTF I could scarcely believe my eyes when I saw a BBS listing of a "TSR function key template for WP5.0." The size of this program's .ZIP was almost a full mega- byte. Well, here's your TSR template--RAM overhead free. The hot key is -F. Pressing that combi- nation brings up WordPerfect's built-in chart of what the F keys do. Press either or to re- turn immediately to your document at the cursor's prior location. ALTG Sends "GO" to your printer, if you need it. (Isn't it about time the printer makers got together and agreed on a standard? Everyone knows that the phrase "Epson compatible" is practically meaningless, and it's ridic- ulous for a program like WordPerfect to require umpteen disks of printer drivers.) ALTK "Kills" (deletes) the line the cursor is in plus one Hard Return. This macro is especially useful for ed- iting ASCII files that have been imported by means of - 1 Dos Text 2 Retrieve (CR/LF to [HRt]). You may also find it useful for deleting lines in batch files, if you do that in WordPerfect, or for erasing lines in a list, for example, MACS.DOC. ALTP Prints all of the document on the screen (- 1). The usual keystrokes are simple enough, but the -P combination is somewhat less awkward. ALTT If you're anything like me, someone who is not a touch typist but types rapidly anyway, you're constantly typing "teh" when you mean "the," and the like. This macro transposes the letter over the cursor with the one before it. (See also TR.WPM.) ALTV View document on the screen at 100%. Headers, foot- notes, page numbers, graphics, type sizes and styles, and many other kinds of formatting do not appear in the editing screen. You can see how they all will look when printed in WP's View Document screen, however. I arbitrarily chose 100% as the viewing size, because it's my favorite way to see things. Feel free to change the macro, if you prefer another setting. Hint: If you don't have an EGA or VGA graphics display capability in your system, 100% looks more like Hebrew than English. Try 200% instead, but you won't be able to see the whole document at its full width, and you'll have to use the cursor keys rather laboriously to view what's to the right. ALTX Switches between Doc 1 and Doc 2. I know that -X is the same number of keystrokes as - (Switch), but try doing the latter combination one handed. The "X" is intended to stand for "transfer" here, and, besides, the -X combination is commonly used in programs for exiting or going from one place to another. The first time you use ALTX, it might seem a little slow (certainly slower than -), but the macro, like all macros, will run much quicker on subsequent calls, because it's in the cache. ALTZ Uses the Advanced Macro Programming Language's {STATE} to determine exactly where you are in the program. ALTZ.WPM returns you from there to the plain-vanilla main editing screen. In other words, it exits from all menus and header and footnote/endnote screens, etc., and it toggles off Block, Typeover, and Reveal Codes. It also answers any Y/N prompt with a yes and then sends a Cancel. If your function keys are at the top of your keyboard, this macro can solve many of your problems relating to poor aim, and it's also easier to find -Z by feel than, for example, . CNFDNTL So you don't work for the CIA or the NSA; every now and then, you might want to send someone a document that you'd like kept quiet. CONFDNTL.WPM puts this: 浜様様様様様様様様様様様様様様様様様様様 * * * C O N F I D E N T I A L * * * 藩様様様様様様様様様様様様様様様様様様様 at the cursor in bold. (It's best to add this to the document before any text to come, because the charac- ters generated by the macro tend to get tangled in already existing [HRt]s.) COM Initiates the Document Comment feature. This allows you to write notes to yourself that won't get printed out with the other text if you happen to forget they're there. I wonder what happens when you print out, if you use Footnote 1000 as a scratch pad, as I've seen suggested? DCOM Deletes all Comments in the document on the screen. This deletes the non-printing Document Comments you added with COM.WPM. DB Deletes blocked text. Don't you feel dumb having to type "Y," if you've just pressed delete after blocking text? Would you go to all the trouble of defining a block and hitting the key, if you didn't mean it? DB.WPM doesn't save any keystrokes, but at least you don't have to answer any dumb questions. (This macro is really here for the sake of symmetry; see also DP.WPM and DS.WPM below.) DP Deletes the paragraph the cursor is in. DRAFT Sets print quality to draft. (See LQ.WPM.) DRFT There are times when you might want to make clear that a document you're sending someone is to be thought of as only a draft. DRFT.WPM puts this: * * D R A F T * * * * D R A F T * * * * D R A F T * * at the cursor in bold. DS Deletes the sentence the cursor is in. EDCOM Edit the first comment following the cursor. Put the cursor anywhere in your document that's before the comment you want to edit but after the previous one. EDCOM.WPM will take you immediately into the comment editing screen with the comment you wanted to change in it. FMARK Finds a marker left in a document and deletes it. (See MARK.WPM immediately below for details.) GETBACK Retrieves WordPerfect's automatic backup file after a crash or power failure. The last thing you want to do after a crash is to go fishing around in the List Files screen for all the data you should have saved but didn't. Quick, what name does WP 5.X give its automat- ic backup file? (You do have the Backup feature turned on, don't you? Go into Setup - and do that, if you don't. You never need it 'til you need it. An automatic backup every ten or fifteen minutes is proba- bly about right.) Whatever the Auto-backup feature finds in Doc 1 gets preserved in a file called WP{WP}.BK1. (Doc 2's con- tents will be in WP{WP}.BK2, if you had anything there when disaster struck.) There, now why couldn't you remember something as obvious as that? Never mind. After a crash or power failure, call WordPerfect up again and answer "no" to the incredibly stupid question "Are other copies of WordPerfect currently running? Y/N." (The question assumes you might be using WP on a network, but how are you supposed to know what it's getting at if you're a plain-vanilla, non-network user, like the vast majority of us?) Then, when you reach the blank document editing display, call GETBACK.WPM and your backup will appear on the screen. This macro assumes your auto-backups get saved in a di- rectory named WP5 on the C drive. If they don't, edit the macro to contain the correct path to your backup files. Also, if you've set up this feature to run every fif- teen minutes and you only were working for fourteen minutes and thirty seconds before the catastrophe vis- ited, there won't be any WP{WP}.BK1 for GETBACK to get back. Sorry. GETBACK also does nothing about recover- ing WP{WP}.BK2, if you happened to be working in Doc 2. You could easily copy GETBACK.WPM to GETBACK2.WPM and then modify the latter in the macro editor to retrieve a backup file for the second document. But please note: The WordPerfect 5.0 Manual (p. 69) says, "If you have documents on both screens (Doc 1 and Doc 2), only the document on your current screen [when the Back-up feature happens to kick in] is backed up." Hmm. LQ Sets print quality to high (Letter or Near Letter Qual- ity). (See DRAFT.WPM.) MARK Leaves a marker at the cursor. Suppose you're editing a 98-page document, and you want to quit for dinner on page 32. Wherever you are, call MARK, and this macro will leave a big, ugly <<>> in your document. (If you're using garish colors for Bold and Underline, it will be even uglier.) When you return, retrieve the document as usual and call the macro FMARK.WPM, which will find the mark, delete it, and leave you where your cursor was previously on page 32. Or you can MARK several spots in a document that you want to return to later, and then FMARK to them one by one from the top of the file. MB Copies and moves blocked text between Doc 1 and Doc 2. This works in either direction. Leave your cursor where you want the copied text to be imported in the first document, Switch (or ALTX) to the second, block the text to be copied and moved, and call MB. MP Copies and moves a paragraph between Doc 1 and Doc 2. Guess what I just used to get this here. MP works just like MB, but no blocking is necessary. Just put the cursor somewhere in the paragraph you want transferred. MS Copies and moves a sentence between Doc 1 and Doc 2. This macro was also used to send its own description here from Doc 2. It works like MP; just put the cursor somewhere in the sentence to be transferred. P2 Prints two copies of all of the document on the screen. PP Prints only the page the cursor is in. PENV Captures an inside address in a letter and prints it with your return address on a standard 9" x 4" enve- lope. I include this one with the greatest of trep- idation, since envelope macros are notoriously dif- ficult to transfer from one system to another. It's those damned printers again; yours does do envelopes, doesn't it? If not, forget this one altogether. If so, permit me to explain the principles behind this one as Alan Kaplan showed them to me, and you can throw out that beat-up old typewriter you were keeping around just for envelope addressing. Maybe you can modify PENV to work on your setup, if need be, maybe not. We're going to be using Doc 2 to do this, so the Doc 2 screen has to be empty or WordPerfect will try to put all of it on the face of your envelope. This is crucial: POSITION THE CURSOR IN THE SPACE ABOVE THE FIRST LETTER OF THE INSIDE ADDRESS. The success of this also could depend to some extent on your having used standard letter formatting (and, of course, you have to have included an inside address in the first place). At one point, PENV searches for the two Hard Returns after the last character in the inside address and the first letter of the word "Dear" in the opening salutation. But first PENV turns off Hyphenation, because WordPerfect can't do all of what's going to happen and stop to ask you to position the hyphen and press at the same time. Then, on the line above the inside address, PENV places a Margin code and an Advance Down code, both of which serve to position the address on the face of the envelope. (You can't see that your letter has been mangled by the margin change, because the macro is running with {DISPLAY OFF}.) Next, PENV blocks the address and its formatting codes and puts them in the Move function's temporary storage area. Returning to the letter, PENV searches backwards to find the line above the inside address again and deletes the Hyphenation, Margin, and Advance Down codes. Your letter regains its original appearance. Now PENV Switches to Doc 2 and Retrieves your inside address, but in the location it will appear on the envelope. Going to the top of the file in Doc 2, PENV imports another file named RETURN.ADR, which must be in a directory called c:\wp5 for this to work. If your WordPerfect directory has some other name, put RE- TURN.ADR there, and edit the macro to contain the right pathname for it. I have supplied a template for RE- TURN.ADR, which you should retrieve in WordPerfect in order to edit your own name and address into it. (Then save it again, of course.) RETURN.ADR is already for- matted to be printed in the upper left-hand corner of the envelope. Finally, PENV prints Doc 2, that is, the two formatted addresses, on the face of your envelope and Exits Doc 2 without saving it. Undoubtedly you will have to fiddle with this to get it to work for you on your system, but you know all the principles. Good luck! One final note: When you Exit your letter after printing the envelope, you will not see the usual, reassuring "(Text was not modified)" message that we have all learned to watch for (often the hard way). It WAS modified when PENV added the codes, but then it was restored to its original state-- saved or unsaved--when PENV returned to delete them. (See also RENV.WPM.) PR2DSK Prints the document on the disk to the screen. A doc- ument printed to disk can be read in an ASCII lister or by means of DOS TYPE (if you can make yourself invoke TYPE). That should seem like no big deal, since any document can be saved in ASCII using the Text Out func- tion. However, codes that get lost using Text Out can very often be preserved by printing to disk instead. For example, a double-spaced file will look single spaced when saved with Text Out and read in a lister, but the double spacing remains when you print the file to disk. The macro pauses and prompts you for a path and filename at the appropriate time. PR2DSK.WPM turns out to be a somewhat dicey macro. To print to disk, you must choose Edit in the Select Printer menu of the Print screen and change the Port for output to a filename. WordPerfect 5.0 (if not 5.1) then seems to retain that filename as the output de- vice, so the next time you print you could well over- write the file you printed to disk with something else, losing it forever. (The one time I made this mistake, I was lucky enough to have a fresh backup.) In the revision of PR2DSK.WPM for the present version, I've tried to account for this by changing defaults at the end of the macro back to what they normally would be before running it. I have eight printer definitions listed on the Select Printer screen, with my preferred default printer at the top of the list and the Standard Printer, which is needed for printing to disk, at the bottom. Therefore, the macro is able to use PgDn and PgUp to select the Standard Printer and eventually reselect the preferred default printer. Your list of printer definitions, however, might not be organized like mine. It might be necessary for you to either reorder your list or else edit the macro to use individual up and down cursor movements to select the right printer definitions. Also, the macro, before concluding, restores the output device to what my sys- tem uses normally: the parallel port, LPT 1. Most printers are connected to that, but yours may or may not be. It might be necessary for you to edit the macro to select whatever output device you do use, if it isn't LPT 1. It seems to me that it's a good practice to hit the save key and perhaps even to have a backup of the file on a floppy before running any macro, such as PR2DSK, that performs a complex operation. Otherwise you risk losing hours of work if something goes wrong. (Word- Perfect's Spell Checker, for example, has something of a reputation for crashing systems, which means that an unsaved, unbacked-up document on the screen could be gone forever.) RENV Uses PENV to address several envelopes in a row. It can be a pain to readjust a printer for addressing an envelope after each letter. Instead, write several letters using PLTR, leaving a [HPg] (Hard Page) between each. Then get the printer set up for envelopes, ad- dress the envelope for the first using PENV, leave the cursor right where it is, over the first letter's inside address, put another envelope in the printer, and call RENV. RENV (the "R" stands for "repeat") goes to the inside address of the next letter and chains to PENV. Then RENV prompts you to put the next envelope in the printer and prints the address in the next let- ter when you press . After RENV produces an ad- dressed envelope for the last letter in your run, press (Cancel) to terminate the macro. By the way, RENV assumes you have a date with a comma between the day of the month and the year. Too bad for you, if you affect the continental format, as in 1 Jan 1980 (a day that shall live in infamy). There also needs to be one other comma in the file before the date's, presumably the one that comes between the city and the state. If you live in an apartment and put a comma between its number and the street address in RETURN.ADR, edit one additional {Search},{Search} into RENV. Put it with the other two (alongside, between, over, under--it makes no difference, as long as they're together). SCRLLDN Scrolls down in both Doc 1 and Doc 2, together. If you call SCRLLDN by itself, you will move the cursor down only one single line in both documents. The macro is meant to be invoked in conjuction with the Repeat fea- ture using . Press and type in an appropri- ate Repeat Value, then call SCRLLDN. The cursor will move down that number of lines in both documents. (See SCRLLUP.WPM; see also ALTD.WPM.) SCRLLUP Scrolls up in both Doc 1 and Doc 2, together. If you call SCRLLUP by itself, you will move the cursor up only one single line in both documents. The macro is meant to be invoked in conjuction with the Repeat fea- ture using . Press and type in an appropri- ate Repeat Value, then call SCRLLUP. The cursor will move up that number of lines in both documents. (See SCRLLDN.WPM.) SP Runs the Spell Checker. This doesn't save keystrokes. I have it only because I used to press - all the time by mistake when trying to do this. For gosh sakes, if the Thesaurus is -, why shouldn't the Dictionary be -? Why -? Sheesh, a program with forty, count 'em, 40+, active function keys. Ah, forget it; let a macro find it. (As I said above, WordPerfect's Spell Checker has something of a reputation for crashing systems, which means that an unsaved, unbacked-up document on the screen could be gone forever. Forewarned is fore- armed.) (See the next to last paragraph below for a tip concerning spell checking.) SSTAFF Provides a 3"-long centered staff for handwritten musical notation. Type once before doing this to leave vertical space (something you'd probably do as a matter of course anyway). Type after running SSTAFF for further vertical space, unless you wish to place text under the musical notes. I admit, SSTAFF and STAFF, which follows, are not going to be useful to everyone. However, I find them extremely useful, because, as it happens, I'm a musicologist by profes- sion, and I got tired of generating neatly word-pro- cessed documents with odd pieces of musical staff stuck on them. If you write letters, papers, articles, or books, on music, as I do, you'll find this one handy for including musical examples. When your Uhu Stic(tm) turns to dust, it won't even matter. STAFF Makes a full-length musical staff (with 1" margins). As before, type before and after for vertical space. This one can be repeated with the feature to generate a reasonably good-looking piece of 12-staff music paper. First, run the macro EXTP.WPM listed above to give yourself less of a bottom margin. Then, type , replace the default Repeat Value 8 with 12, and run STAFF. The last staff should lie just above a Soft Page break. Restore a little of the bottom margin by going to the top of the file and deleting the first Hard Return you find there. Now print, but perhaps set the paper a bit lower than normal in the printer. You're probably astute enough with macros by now to automate all of that, if you want more sheets of music paper quickly, but I recommend taking the first one you just made to Kinkos for reproductions. STATES Displays a list of the US Postal Service's state abbre- viations. Here's another quick question: What's the US Postal Service's two-letter abbreviation for Arkan- sas? AK, right? Wrong, that's Alaska. Arkansas is AR. And Arizona is AZ. And AL is Alabama. Try keep- ing all that straight when you're typing a secondary merge file containing a list of addresses. STATES.WPM uses the Show feature in the List files screen to dis- play a custom-formatted list of USPS state abbrevia- tions. The Show feature in no way interferes with what's on the editing screen in either Doc 1 or Doc 2. When you have verified the abbreviation, press twice, and you will be returned to your document where you left the cursor. TR TR.WPM transposes two adjacent words. Put the cursor anywhere in the second word. (Get rid of that split infinitive!) (See also ALTT.WPM.) WRDCNT Counts the number of words in the document on the screen. WRDCNT.WPM uses the WP Spell-checking feature to make its count. Here's a tip concerning the Spelling-checker: As we all have learned, it's slower than slow. If you think a single, more-or-less ordinary word is probably spelled right but you just want to verify it, don't call the Spell feature and sit there growing old until it loads. Put the cursor in the word and press - to call the Thesaurus. If the word is spelled correctly, you'll see a list of synonyms for it almost instantly. If it isn't, WordPerfect won't be able to find the word in the Thesaurus, and you'll need to con- sult a dictionary. But ninety-nine out of a hundred times you'll be able to settle the question "Somehow that doesn't look quite right; is it?" much quicker with the Thesaurus. I hope you'll find that these macros can lighten your work using WordPerfect 5.X as much as they have mine. Send no money. Richard Wexler January, 1991