1žĢ^3k€€‚@Đ€€ĩMACROCNV.DOC April 1989 CONVERTING WORD 4 MACROS FOR USE WITH WORD 5 WHY YOU MUST CONVERT WORD 4 MACROS There are a number of reasons: new options have been added to or eliminated from some command menus, which have caused the positions of existing options to shift. Also, one Word 4 command menu (Window Options) no longer exists in Word 5 -- it has been incorporated into the general Options menu. Since macros are records of keystrokes, they are dependent on the position of commands in menus. When these change, macros must be adjusted accordingly. ABOUT THE MACRO CONVERSION UTILITY The macro conversion utility, MACROCNV.EXE, will attempt to convert macro keystrokes which invoked Word 4 commands into keystrokes which invoke the equivalent Word 5 command. Glossary entries that are not macros are copied to the converted glossary file, and are not modified. The conversion utility applies your original file names to newly-converted glossary files. Your original glossary files are retained intact, but are renamed using the extension GL4. For example, if you convert a glossary file named MYMACROS.GLY, the converted file will retain this name while the original file will be named MYMACROS.GL4. (The "4" is used to remind you the file is in Word 4 format.) BEFORE YOU RUN THE MACRO CONVERSION UTILITY 1. Make a list of the names (and disk/directory locations) of all the glossary files (GLY extension) containing macros to be converted. You will need this information when you run the utility. 2. MACROCNV.EXE operates only under DOS. If your operating system is OS/2, you'll have to switch to DOS compatibility mode before running the conversion utility. RUNNING MACROCNV.EXE The macro conversion utility allows you to select individual macros for conversion in a specified glossary file, and to define certain guidelines for each macro to be converted. Starting the Macro Conversion Utility To start the utility, switch to the disk/directory containing the file MACROCNV.EXE and, at the DOS prompt, type the following and press Enter: macrocnv The utility will ask you for the name of the glossary file to be converted. Type the glossary name and press . The utility assumes the glossary name has the extension GLY. If you've used another extension, type the complete name, including the extension. NOTES: 1. To load all glossary files in one operation so you can have all your macros available for conversion, type the following and press Enter: macrocnv *.gly 2. To start the utility and load one or more specific glossary files, type macrocnv, followed by a space and then the glossary name(s). Type a space between each name if you specify more than one. For example, macrocnv gloss1.gly gloss2.gly The Macro Conversion Screen Display The conversion utility screen is split into three areas: a list of available macros at upper left (30 characters wide), an informational area at upper right, and a command menu below. To Set Conversion Options There are three sets of options you can set for each macro to be converted. When you mark a macro for conversion, the utility will use the current option settings. If you want to change the settings for a particular macro, do so before you mark it (see below). To set conversion options, press the letter O. An Options screen display will appear. The options are divided into three sections: 1. Translate changed function keys. Controls whether changes in function keys between Word 4 and Word 5 should be converted. The utility assumes function keys are used in your macros to engage Word functions, and not to start other macros. The function keys affected are listed below. Ctrl+F4. In Word 5 edit mode, this key toggles selected text between lowercase, uppercase, and first-letter-uppercase. In Document-Retrieval, this key re-computes the document list (this was the key's only function in Word 4). Alt+F4. In Word 5, this key switches to "show layout" mode; in Word 4, this key was used to set margins. Ctrl+F9. In Word 5, this key switches to the Print Preview display. In Word 4, this key was used to repaginate a document. Unless you use any of these keys to start other macros, leave this option set to Yes, the default setting. To change to No, press the letter T. To change back to Yes, press T again. 2. Macro called while... Use this option to tell the utility whether the macro is called while editing text, while in the Gallery, or while in Document Retrieval. The default setting for this option is Editing Text. To change to Gallery, press the letter G. To change to Document Retrieval, press the letter D. To change back to Editing Text, press the letter E. 3. Macro called from within menu... Use this setting to tell the conversion utility whether the macro is called from within a command menu. The default setting for this option is No. To change to Yes, press the letter M. To change back to Yes, press M again. --To save options changes and return to the main screen, press Enter. --To return to the main screen without saving any changes, press Esc. You can call a macro while navigating through menus. However, the macro conversion cannot know the exact menu location at which a macro starts and may not be able to convert all keystrokes correctly. Therefore, when you set the "Called from within menu" option to Yes, the macro conversion utility offers you an option to place a reminder in the converted macros: WARNING: Macro may not be converted correctly. Insert reminder in macro (y/n)? If you answer Yes (the default) to the warning message, the following PAUSE instruction will be inserted at the start of the macro to remind you when you run the macro that it may not work correctly: ŽPAUSE WARNING: Macro may not work correctly. (Enter to continue, Esc twice to abort)¯ You can remove this message by editing the macro. For information, see "Editing Macros" in Using Microsoft Word, Chapter 24, "Macros." Conversion in such macros will take place starting with the first occurrence of (or , if not preceded by ). To Mark Macros for Conversion When you start the utility, an arrow will appear to the left of the first macro on the list. To mark a macro to be converted, use the Up and Down arrow keys, and PgUp or PgDn keys, to move to the macro name. Press the Spacebar to mark the macro for conversion. When a macro is marked, an asterisk (*) will appear to the left of the name. --To unmark a marked macro, move to the macro name and press the Spacebar again. --To mark all macros in one step, press the letter M. --To unmark all marked macros in one step, press the letter M again. To Convert Marked Macros To convert all marked macros and exit the utility, press the letter C from the main screen. To Exit Without Converting Macros To exit the utility without converting macros, press the letter E from the main screen. To Cancel a Conversion in Progress If you have set Break=On in DOS, you can cancel a macro conversion in progress without saving the new glossary file by pressing Ctrl-Break. The utility will restore any partially converted glossary and will return to DOS. RUNNING MACROCNV.EXE IN BATCH MODE To convert all macros in one or more glossary files in a single operation, you can operate the macro conversion utility in "batch" mode. To Start MACROCNV.EXE in Batch Mode At the DOS prompt, type "macrocnv", followed by the name of the glossary file(s) to be converted, and the switch, /b (for "batch"). For example, macrocnv gloss1.gly gloss2.gly /b Be sure you place a space between the utility name and the glossary name, between each glossary name if more than one, and before /b. Press Enter to start the utility. If you want to convert all glossary files in the current directory at once, you can use the DOS wildcard character (*) and the extension GLY instead of an individual glossary name. For example: macrocnv *.gly /b Press Enter to start the utility. If no filenames are supplied, MACROCNV will ask you for the name of a glossary file to convert. Type the name and press Enter to start the utility. When you convert macros in batch mode, the default options settings (as indicated in "To Set Conversion Options," above) are used. To Cancel a Conversion in Progress To cancel a macro conversion in progress without saving the new glossary file, press Ctrl-Break. The utility will restore any partially converted glossary and will return to DOS. IMPORTANT NOTES * The macro conversion utility will copy all non-macro glossary entries unchanged into the new glossary file. However, footnotes that are part of non-macro glossary entries will not be converted. To use the entries that include footnotes, you will need to use the original non-converted glossary file. * MACROCNV will not convert Word 5.0 glossaries or glossaries already converted once. * The conversion utility will correctly convert most macros. However, situations may appear in some macros that the utility will be unable to convert properly. * Written macros and recorded macros may encounter different sorts of problems when converted. In general, if a recorded macro does not convert correctly, the easiest and best solution is to simply record it again in Word 5. Written macros are typically "better behaved" and will likely have fewer conversion problems. The best way to tackle problems with written macros is to manually re-write the parts that do not translate correctly. Macros which may not be converted correctly include those with IF statements where the 2 clauses of the IF leave Word in a different state, as well as WHILE statements which change the state of Word in each iteration. For information on how to edit macros, see "Editing Macros" in Using Microsoft Word, Chapter 24, "Macros." * The conversion utility does not alter macro instructions (such as SET, ASK, IF, etc.); these remain intact. However, you should check your instructions to make sure they do not rely on any Word 4 functions that have changed in Word 5. * If a macro contains errors before conversion, it will most likely contain them after the conversion as well. For example, if you have "" in the macro instead of "," it will be converted as is, and will behave identically in Word 5 as it did in Word 4. In cases like this, no error message is generated. A LIST OF WORD 5 CHANGES AFFECTING MACROS The following are among the changes in Word 5 that can affect the operation of macros created in Word 4 (the list is not exhaustive): * The Options command has several new fields and has been completely reorganized. The Window Options command has been eliminated and incorporated into the Options command. * The "display" field of the Options command in Word 4 has been changed to "display mode" in the Word 5 Options menu. In Word 4 you selected from two choices: Graphics and Text; in Word 5 you press F1 and select from a list of display modes available for your video adapter. The conversion utility will not convert activity in this field; you will need to edit any macros that change the setting in the Word 4 Options "display" field. * Library Spell operates in a significantly different manner, and the commands have changed. In Word 4, macros could choose Library Spell, but could not operate commands within the speller -- the macro would pause so you could operate the speller manually, and then resume when you exited. Since Library Spell commands now can be used in macros with Word 5, the conversion utility will insert a ŽQUIT¯ instruction in any Word 4 macro it detects using Library Spell, at the location of the Library Spell command. When you run the converted macro, it will stop running at the point. This is to let you know you need to rewrite or re-record the remainder of the macro after the point at which the speller was used. * The Library Link command now has a menu of three separate commands: Spreadsheet, Graphic, and Document. In Word 4, the command was used to link only spreadsheets. * Choices for the Format Border "line style" field no longer appear in the menu. In Word 5 you select an option for this field by pressing F1 and choosing from a list. * In the Format Running-head command, the "position" field has a new option: None. * A "font color" field has been added to the Format Character menu; the "hidden" field has moved to a new location in this menu. * In the Format Revision-mark "position" field, "Alternate" has been renamed "Outside." * The "range" field has been removed from the Library Document-retrieval Print command. * Choices for the Print Options "feed" field no longer appear in the menu. In Word 5 you select an option for this field by pressing F1 and choosing from a list of settings available for your printer. ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ܀ČwÎ˙˙ōr¸˙˙Üm˙˙ēh%˙˙;cō˙˙^Č ˙˙Đ Yw ˙˙ÜÜÜÜÜ``aaaaaw œ vW ˙˙r q˙˙%m¨˙˙Āi˙˙<e%˙˙,a¸˙˙×\˙˙ÜÜÜÜÜ``abbb``v‚˙˙Ĩq˙˙(l˙˙5gÃ˙˙čbw!˙˙›!]U"˙˙f"XÉ)˙˙ÜÜÜÜa``a```É)ô)v^3˙˙Ĩq˙˙(l˙˙5gÃ˙˙čbw!˙˙›!]U"˙˙f"XÉ)˙˙ÜÜÜÜa``a``a€ŽxšxČxĘ˙˙Ė˙˙Î˙˙ō˙˙´˙˙ļ˙˙¸˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ< ¸Ü˙˙Œ˙˙Ž˙˙õ˙˙÷˙˙‰˙˙‹˙˙˙˙ē˙˙|˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ< |~˙˙!˙˙#˙˙%˙˙;˙˙î˙˙đ˙˙ō˙˙˙˙˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ< Ŧ˙˙Ž˙˙Ŋ˙˙ŋ˙˙Æ ˙˙Č ˙˙Đ ˙˙Ō ˙˙` ˙˙b ˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ< b w ˙˙y ˙˙L ˙˙N ˙˙s ˙˙u ˙˙w ˙˙œ ˙˙U ˙˙W ˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ< W r ˙˙x ˙˙z ˙˙Ņ ˙˙Ķ ˙˙˙˙˙˙!˙˙#˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ< #bqbíbī˙˙Ļ˙˙¨˙˙L˙˙N˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ< `úđđ N˙˙˙˙Ļ˙˙¨˙˙ ˙˙"˙˙i˙˙k˙˙˛˙˙´˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ  ´!˙˙#˙˙]˙˙y˙˙{˙˙D˙˙F˙˙‚˙˙¤˙˙Ļ˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ  Ļ.˙˙0˙˙´˙˙ļ˙˙¸˙˙×˙˙Ų˙˙,˙˙.˙˙€˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ  €‚˙˙š˙˙ģ˙˙˙˙˙˙˙˙˙˙!˙˙~˙˙€˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ  €‚˙˙Ĩ˙˙§˙˙˙˙˙˙˙˙(˙˙*˙˙ ˙˙ ˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ   ˙˙˙˙˙˙5˙˙ŋ˙˙Á˙˙Ã˙˙č˙˙ę˙˙|˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ  |~˙˙Ļ˙˙¨˙˙R˙˙T˙˙ ˙˙ ˙˙1 ˙˙3 ˙˙V ˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ  V X ˙˙í ˙˙ī ˙˙s!˙˙u!˙˙w!˙˙›!˙˙!˙˙Q"˙˙S"˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ  S"U"˙˙f"˙˙h"˙˙—#p™#˙˙đ#eō#˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ <Đ0ũ <Đ0ũō#“$p•$˙˙x%e•'\—'˙˙…(Q€Cđ€Cđ€Cđ €Cđ€Cđ€Cđ€Cđ€ <Đ0ũ<Đ <Đ0ũ <Đ0ũ…(‡(pÅ)pĮ)˙˙É)˙˙ô)˙˙ö)˙˙}*˙˙*˙˙€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€CđĐ <Đ0ũ <Đ0ũ*,+p.+pâ,pä,p­/p¯/pU0pW0p1p€Cđ€Cđ €Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€CđĐ0ũ <Đ0ũ 11pV1pX1pÚ1pÜ1p52p72p2p’2p€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€CđĐ0ũ <Đ0ũ ’2\3p^3p_3˙˙€Cđ€Cđ72p2p’2p€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€Cđ€CđĐ0ũ <Đ0ũ ›$?r#,Ū2^6GÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ !"#$,4Macrocnv.doc03/31/8903/16/89Ū2ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ