Archive for November, 2018


Word: Create a custom dictionary populated with thousands of terms

November 30, 2018

There are plenty of websites that tell you how to create a custom dictionary in Microsoft Word. But most assume you only have a few words to add to that dictionary. But what if you have thousands? Doing it one word at a time using the usual methods is painfully slow and not ergonomically sound.

I had such a situation a few months ago, but neglected to write up what I did. I had 4000+ Latin and common species names I’d gathered from public lists that I wanted to add to a unique dictionary so that Word didn’t flag them as spelling errors, except if they really were spelling errors or if they were species I hadn’t included in my species dictionary. I wanted a special dictionary file that I could copy and use on other computers, and turn off if I no longer needed it, so I didn’t want these words added to my default dictionary.

The first thing was to find out where the dictionary files are stored. I use Word for Windows, so this information is for Windows. By default, the Office dictionary files (Office 2010 to 365, at least) are stored in C:\Users\<username>\AppData\Roaming\Microsoft\UProof and have a *.dic file extension. (Note: Follow these instructions if you can’t see the AppData folder.)

Now, *.dic files are just text files with a different file extension. This means you can open them in a text editor (e.g. Notepad; I use EditPlus because it has a ‘sort’ option, but Notepad works fine). Once you’ve opened a *.dic file in a text editor, you can add, edit, or delete entries. Just make sure you save the file with the *.dic file extension, not *.txt. And make sure you specific the Encoding as Unicode, not the default ANSI.

Because *.dic files are just text files, you can also use a text editor to create a new dictionary file. However, I started by creating a new (blank) custom dictionary in Word because I wanted to sort them and run a macro to check for duplicates. The main thing to remember is that each word MUST go on its own line. You cannot have two words on one line (that includes compound words with a hyphen). So, in the case of Latin species names, I had to put each part of the name on a separate line — this is why I had to sort the list and look for and delete duplicates (there are more than 700 species of eucalyptus, for example). Once I’d done that I copied them into my text editor, and continued from step 3 below.

In essence:

  1. Open a text editor.
  2. Add your words, ONE only on each line. Press Enter after each word.
  3. Save the file with a DIC file extension (NOT txt). (NOTE: Office 365 dictionaries MUST be saved with Unicode encoding**).
  4. Save it to the UProof folder (C:\Users\<username>\AppData\Roaming\Microsoft\UProof).
  5. Open Word and go to Word Options > Proofing. (You need to tell Word there’s a new dictionary to check.)
  6. Click Custom Dictionaries.
  7. Click Add.
  8. Select your new dictionary file, then click Open.
  9. Select the check box for your new dictionary file so that Word knows to check it.
  10. Click OK.

That should be it!

** If you try to add a non-Unicode DIC file to Office 365, you’ll get a message that you can’t. The solution is to open the DIC file in a text editor, then Save As and select Unicode as the encoding type (the default is ANSI). Once saved, continue with the steps above.

[Links last checked November 2018]


Word: Apply a highlight to all tracked changes

November 22, 2018

Over on an editors’ group I’m part of on Facebook, Wendy asked if there was a way to highlight all her tracked changes. Well, tracked changes are already shown in a different font colour and formatted with underlines (insertions) or strikethroughs (deletions) by default, but she wanted more.

As she found, find and replace didn’t work with finding tracked changes. So she was looking for a macro. I’m not good at writing macros, but I’m pretty good at finding them! And then at modifying them for my purposes. A quick search found two possibilities:

I tested them both on an 80p Word document with some 1450 revisions — the first one worked well and quickly (less than 1 minute), but accepted all my track changes and applied a dark green highlight, which I found hard to read. The second was either still going after an hour, or had hung. Whatever, it had stopped Word and I had ‘not responding’ in the title bar. I ‘killed’ Word and decided to only go back to that one if I couldn’t make the modifications I wanted to the first one.

Meantime, I modified the first macro to NOT accept all the track changes and to change the highlight colour to pink instead of the dark green. Here’s my version of that macro in case it ever disappears from the intertubes at that website. Full credit goes to the macro author ‘nixda’.

If you intend using this macro, copy and paste it — some of the lines may go off the page and you’ll miss this information if you type it.

Sub Tracked_to_highlighted()

' Macro provided by nixda, 18 Sep 2014,
' Adapted by Rhonda Bracey, CyberText Consulting Pty Ltd, 22 Nov 2018, 
' to not accept all track changes and change highlight colour to pink
    tempState = ActiveDocument.TrackRevisions

' Turn off track changes
    ActiveDocument.TrackRevisions = False
    For Each Change In ActiveDocument.Revisions
        Set myRange = Change.Range
        ' myRange.Revisions.AcceptAll
        myRange.HighlightColorIndex = wdPink
    ActiveDocument.TrackRevisions = tempState
End Sub

[Links last checked November 2018]