
TMX Speller for MS Word
by Samuel Murray, November 2006

This speller is an MS Word macro that marks up your TMX file so that only the target text is spell-checked by MS Word.

You need:

* The style tw4winExternal in your Normal.dot (embedded in tw4winExternal.doc)
* The a_tmxspeller macro (contained in macro.txt)

1. Setting up MS Word

MS Word regards a TMX file as if it were an HTML file, and parses it automatically when opened.  To prevent this, make the following change in your MS Word, and remember to open your TMX using the File -> Open method (not by dragging/dropping or by double-clicking the TMX file).

Go to Tools -> Options -> General, and tick "Confirm conversion at Open".

2. Adding tw4winExternal

If you're a Wordfast, WordFisher, Ando Tools or Trados user, chances are you already have tw4winExternal in your Normal.dot, but if not, here's how to add it.

Get an MS Word document with tw4winExternal in it (bundled with this should be such a file), and open it in MS Word.

Go Tools -> Templates and Add-Ins.  Click "Organizer...".  Select tw4winExternal in the current document, and click "Copy" to copy it to Normal.dot.  Then click both "Close File" buttons, and restart MS Word.

3.  Editing the macro

The macro in this package is for the MS Word spell-checker "Afrikaans" and for the OmegaT language "AF-ZA".  Search the macro for these two terms and replace them with your languages.  The line "Selection.LanguageID = wdAfrikaans" needs to match your MS Word's spell-checker exactly (good luck figuring it out).

4. Adding the macro

Before adding the macro, make sure you've edited the macro with your languages.

Go Tools -> Macro -> Macros..., type in the name "a_tmxspeller" as the macro name and click "Create".  Paste the accompanying macro in that place, save, and restart MS Word.

Optionally, to create a keyboard shortcut for the macro, do the following:

Go View -> Toolbars -> Customize..., and click "Keyboard".  In the Categories, select "Macros" and in the Macros, select "a_tmxspeller".  Put your cursor in the field "Press new shortcut key:" and press Alt+0 (or a shortcut of your choice that doesn't conflict with an existing shortcut).  Click "Assign", and restart MS Word.

5. Running the macro

First, open the TMX file by using the "File -> Open" method.  If you don't see the XML source code, then MS Word has parsed the code (and you gotta prevent that).

To run the macro without the keyboard shortcut, open the TMX file, go Tools -> Macro -> Macros..., select "a_tmxspeller" and click "Run".  Otherwise, simply press the keyboard shortcut.

==

