I wrote these macros to make Microsoft Word more useful. I originally wrote them in WordBasic in Word 6. The Word 97/98 macros should work on a PC, but I have no idea whether the Word X macros will work on other platforms.
You can acquire all the macros below plus a lot of other customized stuff by downloading the template. Your toolbar and some of your quick-key commands will change. The quick-key commands associated with some of the macros will be incorporated into your template.
To use the Word X macros, you must have installed the Microsoft Office X updates 10.1.2, 10.1.4, and 10.1.5.
To make the macros available to all documents:
- Word X:
- Download this template to Applications/Microsoft Office X/Templates.
- Launch Word.
- Choose Templates and Add-Ins ... from the Tools menu.
- Choose Attach ..., find the downloaded template, and then choose OK.
- Word 97/98:
- Download this template to Applications/Microsoft Office 98/Templates.
- Choose Templates ... from the Files menu.
- Choose Attach ..., find the downloaded template, and then choose OK.
To make the macros load automatically in all documents:
- Word X:
- Double-click on the downloaded template to launch Word.
- Open the Preferences window (COMMAND-,).
- Click File Locations, click Startup, and navigate to Applications/Microsoft Office X/Office/Startup/Word.
- Click Edit and uncheck "Automatically select entire word", "Use smart cut and paste", and "Overtype mode".
- Press OK to close the Preferences window.
- From the File menu, choose Save As ...
- Browse to Applications/Microsoft Office X/Office/Startup/Word.
- Press the Options ... button.
- From the pop-up menu, choose Document template.
- Save the file (any name will do).
- Reopen the Preferences window (COMMAND-,).
- Click Save and from the pop-up menu, choose Word document.
- Press OK to close the Preferences window.
- Quit and restart Word.
- Word 97/98:
- Change the name of your old template Normal to Old Normal.
- Rename the downloaded template Normal.
- Quit and restart Word.
To the best of my knowledge, there are no macro viruses in these templates, but I do not guarantee it. To the best of my knowledge, the information I provide here is accurate, but I do not guarantee it.

Macros for Writing Papers, Proposals, or Books
- AddCompoundNumber -- Changes the numbering of the compounds in your proposal or paper. Useful when you want to insert or delete a compound in the middle of your paper or proposal, and the numbering of the compounds thereafter has to change. A number that you specify is added to all compound numbers above another number that you specify. If you want to subtract numbers because you have deleted one or more compounds, specify a negative number. Features:
- Numbers not in boldface are not changed.
- Boldface numbers following the words "Scheme", "Figure", or "Table" are not changed.
- The macro can handle compound numbers combined with letters; e.g., 14c becomes 16c.
- Only numbers at the beginning of a boldface sequence are changed. Numbers in the middle of a boldface sequence are ignored. E.g., "8 and 10" becomes "9 and 11", but "8 and 10" becomes "9 and 10" (because 10 is not at the beginning of the boldface sequence). Be especially careful of sequences like "13-16"; if the dash is in bold, then "13" will be changed but "16" will not.
- The macro does not wrap, so only numbers occurring after the insertion point will change.
- Compound numbers embedded in graphics must be changed by hand. (Sorry, you can't have it all.)
- Numbers greater than 1800 (i.e., years) are not changed. However, volume numbers of references are changed if they are emboldened. Temporarily remove the references to a different document before running the macro.
- AddGraphicNumber -- Changes the numbering of graphics (Schemes, Tables, or Figures) in your proposal or paper. Useful when you want to insert or delete a graphic in the middle of your paper or proposal, and the numbering of the graphics thereafter has to change. A number that you specify is added to all numbers following either "Scheme", "Figure", or "Table" (but not the plural forms of these words) that are larger than another number that you specify. If you want to subtract numbers because you have deleted a Scheme, Figure, or Table, specify a negative number. The macro does not wrap, so only numbers occurring after the insertion point will change.
- StripText -- Removes all text from a Word document, leaving behind only the ChemDraw graphics in preparation for saving each graphic in its own Encapsulated PostScript file.
- SaveGraphics (save this file to your computer) -- This is an AppleScript program, not a Word macro. It takes a Word document containing nothing but ChemDraw graphics (generated by the macro StripText) and saves each one individually in its own Encapsulated PostScript file. First, acquire the free control panel Okey Dokey Pro and set it to run for ChemDraw. Second, open the Word document that contains nothing but the ChemDraw graphics. Third, create an empty folder where you will be saving the graphics from this document. Fourth, open a blank ChemDraw document with desired drawing and text settings. Finally, open the script with Script Editor. Make sure that the names of your Word and ChemDraw applications are correctly rendered in the script. Run the script. The graphics will be saved in files named "gr1.EPS", "gr2.EPS", etc., in the folder you indicate. If the script crashes, simply delete the last file saved and restart. You can stop the script in the middle, and when you restart it will begin where it left off. I don't know whether this program will work on MacOS X computers.
Chemistry Macros
- AboveElectron -- Puts a lone electron above a letter that you highlight.
- AboveLonePair -- Puts a lone pair above a letter that you highlight.
- AboveMinus -- Puts a minus sign above a letter that you highlight.
- AbovePlus -- Puts a plus sign above a letter that you highlight.
- ArrowEquilibrium -- Inserts a pair of back and forth arrows.
- ArrowReaction -- Inserts a forward arrow (from the Symbol Font).
- ArrowResonance -- Inserts a resonance arrow (from the Symbol Font).
- ArrowRetrosyn -- Inserts a retrosynthesis arrow (from the Symbol Font).
- PastePicture (Word 97/98 only) -- Allows a picture to be pasted into the text rather than above it. When the regular "Paste" command is used to paste a picture into a document, the picture is automatically framed and floated above the text. This macro uses the "Paste Special ..." command to insert the picture directly into the text. Keyboard: COMMAND-OPTION-V. The benzene button on the Chemistry toolbar represents this macro.
- p Ka -- Inserts the term pKa with the proper formatting.
- TripleBond -- Inserts a triple bond (from the Symbol Font). Keyboard: COMMAND-OPTION-=.
General Macros
- AndSwitch -- Switches "phrase 1 and phrase 2" to "phrase 2 and phrase 1". Also switches "phrase 1, and phrase 2" to "phrase 2, and phrase 1". Switches phrases separated by: and, or, nor, &. Keyboard: COMMAND-OPTION-7.
- Bold -- Toggles highlighted text between boldface and not boldface. If no text is highlighted, subsequent typed text will be boldface. In the packaged Bold command, if the cursor is in a word or immediately to the right of a word and no text is highlighted, the word becomes boldface; this macro will not make the word boldface, but any text you type subsequently will be boldface. Keyboard: COMMAND-B, COMMAND-SHIFT-B.
- ChangeFont -- Changes all text in a font that you specify to another font that you specify.
- Italic -- Toggles highlighted text between italic and not italic. If no text is highlighted, subsequent typed text will be italic. In the packaged Italic command, if the cursor is in a word or immediately to the right of a word and no text is highlighted, the word becomes italic; this macro will not make the word italic, but any text you type subsequently will be italic. Keyboard: COMMAND-I, COMMAND-SHIFT-I.
- Overstrike -- Overstrikes two characters or words separated by a comma. Useful for putting any of the following accent marks over "untraditional" letters, like x-tilde. Keyboard: COMMAND-\.
- acute (OPTION-SHIFT-E on the Mac)
- grave (upper left on the Mac keyboard)
- circumflex (OPTION-SHIFT-I on the Mac)
- diacritical (umlaut) (OPTION-SHIFT-U on the Mac)
- tilde (OPTION-SHIFT-N on the Mac)
- overbar (OPTION-SHIFT-, on the Mac)
- smile (short) (OPTION-SHIFT-. on the Mac)
- upside-down circumflex (OPTION-SHIFT-I on the Mac)
- dot (OPTION-H on the Mac)
- circle (OPTION-K on the Mac)
- cedilla (OPTION-SHIFT-Z on the Mac)
- OverstrikeAboveBelow -- Overstrikes two characters or words separated by a comma, raising the first and lowering the second by four points so they are not superimposed.
- ParensAdd -- Surrounds the highlighted text with parentheses. Ignores space and paragraph marks at the end of the selection. Keyboard: COMMAND-0.
- ParensRemove -- Removes the parentheses from around the highlighted text. The parentheses themselves should not be highlighted. Keyboard: COMMAND-9.
- Subscript -- Reduces the font size of highlighted text by 2 points and lowers the text by 3 points. If no text is highlighted, subsequent typed text will be 2 points smaller and lowered by 3 points. If highlighted text is already lowered, it will unlower it and increase the font size by two points. Keyboard: COMMAND-SHIFT-- (COMMAND-_) and COMMAND-=.
- SubscriptToSubscript -- Converts text formatted in Microsoft's subscript or superscript font into normal text that is raised or lowered by 3 points and shrunk to a point size you choose, or vice versa. Can also change the font size of all text that is raised or lowered by 3 points.
- Superscript -- Reduces the font size of highlighted text by 2 points and raises the text by 3 points. If no text is highlighted, subsequent typed text will be 2 points smaller and raised by 3 points. If highlighted text is already raised, it will unraise it and increase the font size by two points. Keyboard: COMMAND-SHIFT-= (COMMAND-+).
- ResetChar -- Removes all enhancements from highlighted 12-point text, including boldface, italics, etc. Also converts Symbol font (but no other) to Times. If no text is highlighted, subsequent typed text will be unenhanced. Keyboard: COMMAND-SPACE, COMMAND-SHIFT-SPACE.
- SwitchTwoChars -- Switches the position of two highlighted, adjacent characters. Keyboard: COMMAND-OPTION-`.
- Underline -- Toggles highlighted text between underlined and not underlined. If no text is highlighted, subsequent typed text will be underlined. In the packaged Underlinecommand, if the cursor is in a word or immediately to the right of a word and no text is highlighted, the word becomes underlined; this macro will not make the word underlined, but any text you type subsequently will be underlined. Keyboard: COMMAND-U, COMMAND-SHIFT-U.
Miscellaneous Keyboard Strokes
- COMMAND-OPTION-1 makes paragraph spacing exactly 12 points (unless the font is Palatino, in which case it is exactly 14 points).
- COMMAND-OPTION-5 makes paragraph spacing exactly 18 points.
- COMMAND-OPTION-2 makes paragraph spacing exactly 24 points.
- CONTROL-Q converts only the next typed character into Symbol font (Word X only).
- CONTROL-- inserts a nonbreaking hyphen (Word X only).
- CONTROL-SPACE inserts a nonbreaking space (Word X only).
- CONTROL-F inserts a frame (Word X only).