New Diacritics Word Macro

THL Toolbox > Fonts & Related Issues > Diacritic Fonts > Input Tools > Word Template & Macros

Unicode Diacritics Macro for MS Word

Contributor(s): Than Grove

Note: The Word Macros for inputting diacritics has gone through a number of iterations. The previous version displayed options in the status bar or an individual popup. This has been supplanted by the present version which uses set prefix keys for the diacritics. See Instructions for Old Word Macro for Diacritic Input for the description of the previous macro.

Installation

The above download .zip file contains a folder with a Word Template with Macros (THLDiacriticTemplate.dotm, created with Word 2007) and a Visual Basic project (THLDiacritics.bas). Either or both can be used. The simplest way to use the diacritic macros is simply to open a new document by double-clicking on the Word Template. This will open a new document and automatically try to run the macro to assign the key strokes for diacritics. If your security settings are on medium or high, Word will not automatically allow the macro to be run but will ask your permission. You can use the Microsoft Office Trust center to circumvent this for certain folders.

The template can also be installed in your profile’s template folder at C:\Users\{your user name}\AppData\Roaming\Microsoft\Templates. (You have to be able to view hidden folders. A simple search can show you how.) Make sure you have exited out of Word before copying the template into that folder.

Lastly, the macros can be added directly to one’s present Normal template by doing the following:

  1. Open any document in Word
  2. Press Alt-F11, which will open the Visual Basic editor
  3. Under the View menu choose “Project Explorer”
  4. In the Project window, right click on “TemplateProject (Normal)”
  5. Choose “Import File”
  6. Locate the “THLDiacritics.bas” and choose it.

This will add a Modules folder that contains the project called “THLDiacritics”, which contains the macros. To enable the diacritics you will need to run the “AutoExec” subroutine within that project or assign it to a shortcut keystroke. To disable the diacritics run the “disableDiacritics” macro.

Usage

The diacritics are entered using the basic pattern of “Alt” key simultaneously with a prefix key that determines the type of macro followed by the letter (lowercase or uppercase) that the macro is to be placed with. Thus, the character “Ū” (or U with a macron over it) would be entered by pressing Alt-M (M for “macron”) and then the capital U. The following table outlines how to enter in the various diacritics (note that the “Used With” column lists only capital letters but in all instances if a capital is listed its corresponding lower-case letter is also implied):

Prefix KeyDiacriticUsed With
Alt-aAccent AcuteA, E, I, O, S, U, Y, Z
Alt-gAccent GraveA, E, I, O, U
Alt-. (period)Dot below a letterD, H, L, M, N, R, S, T, Z
Alt-> = Alt-Shift-.Dot above a letterM, N
Alt-mmacronA, E, I, O, U, D (below), G, K (below), L (macron above, dot below), R (macron above, dot below), T (below)
Alt-~ = Alt-Shift-`tildeA, E, I, N, O, U
Alt-: = Alt-Shift-;diaeresis or umlautA, E, I, O, U
Alt-^ = Alt-Shift-6circumflexA, E, I, O, U
Alt-,cedillaC, S
Alt-vcaronC, E, J, S, Z

Provided for unrestricted use by the external link: Tibetan and Himalayan Library