## 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 2016, 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.

Because *.dic files are just text files, you can also use a text editor to create a new dictionary file. However, I started with 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. 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).
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.
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!

## Word: My process for copying content into a new template

October 9, 2018

Someone asked me the other day what my ‘best practice’ was for applying a new template to an existing Word document. Well, the answer is: ‘It depends’. And what it depends on is the complexity of the document.

If it’s a simple document in one section, with basic formatting, few—if any—cross-references, uses the same page layout throughout, has little (or no) document automation, etc., then just applying the new template may well be enough (assuming the style names in both are the same). You may have a few tweaks to do with the formatting (e.g. reapplying styles), but you should be done.

However, for a more complex document, like the ones I work on, it’s not so simple. My docs have cover and front matter pages, lots of document automation, outline numbered headings, potentially hundreds of cross-references, many section breaks for landscape and A3 pages, appendices, tables of contents/tables/figures, headers and footers populated with data from the cover page (we used to have odd/even headers/footers too, and various page numbering formats, but we got rid of those some time ago because they just added a lot of overhead for no real value), etc. It’s really the section breaks that will cause you grief, plus totally different cover pages and headers/footers. As for a simple document, the process will be much smoother if the style names in both docs are the same.

Oh, and before you ask, yes, I’ve tried every which way to simplify the process below, but each one just adds more time overhead to sorting out the document after I’ve pulled it over. The method that causes me the least grief is the one below.

NOTES:

• Save often!
• Make sure formatting marks are turned on so you can see the section breaks.
• DO NOT copy section breaks. There lie dragons!!
• You may still have some tweaking to do with applying the correct styles. You can either do this as you go (after each paste), or wait until the end and do it all in a separate pass. Alternatively, make a copy of the old doc, apply the new template to it and fix all the styles first, before copying across the content.

How I deal with putting a complex document onto a new corporate template:

1. Start a new document based on the new template.
2. If you want to preserve any existing comments or track changes from the old doc, make sure track changes is turned OFF in BOTH docs—the new AND the old.
3. Manually complete all the cover page (and other front matter) information in the new doc.
4. DO NOT copy across the old table of contents, list of tables, or list of figures. You’ll update these later (Step 13) with the new headings.
5. Let’s assume the main body of the doc starts at section ‘1. Introduction’. Go to that heading in the new doc, then press Enter a couple of times to create some space.
6. Go to the old doc and copy the content AFTER the ‘1. Introduction’ heading UP TO, BUT NOT INCLUDING, the first section break.
7. Paste that content into the relevant place (the space you just created) in the new doc.
8. Manually insert a section break start AND end for the next section in the new doc, and add some empty paragraphs between them. Change the page layout for the section as necessary (e.g. landscape orientation).
9. Go back to the old doc and copy everything INSIDE the section break, but NOT the section break itself.
10. Paste into the new doc in between the start and end section break marks you created in Step 8.
11. Repeat steps 8 to 10 for ALL section breaks and their content.
12. When you’ve finished, delete any headings and text from the original template that are not required.
13. Go back to the table of contents in the new doc and update it. Repeat for the list of tables and figures too.
14. If you have cross-references in your doc, switch to Print Preview mode, then back to Page Layout mode.
15. Do a Find for ‘Error!’ to find any broken cross-references. Fix, based on the cross-reference information in the old doc.
16. Zoom out to about 30% and do a visual check to make sure your headers/footers for each section are correct for the page layout.

That should be it!

## Word: Insert prime and double prime characters

September 23, 2018

Just as there’s a special character for a degree symbol, there are also special characters for prime and double prime symbols (used when referring to latitude and longitude especially). These are NOT the same characters as a single or double quote mark, though many people assume they are.

Use one of these methods to insert a proper prime or double prime symbol in Microsoft Word:

• If you have a separate number pad, then press Alt+8242 (press and hold the Alt key while you type 8242) for prime, or Alt+8243 for double prime.
• Go to the Insert tab > Symbol — the prime symbol is character code = 2032, Unicode (hex), and double prime is 2033.
• If you have Math AutoCorrect turned on, then type \prime<space> for prime, or \pprime<space> for double prime (to turn on Math AutoCorrect: File > Options > Proofing > AutoCorrect Options > Math AutoCorrect tab).
• Supposedly you can also type 2032, Alt+x or 2033, Alt+x but neither of those worked for me.

## Word: Insert a degree symbol

September 22, 2018

There’s a special character for a degree, so don’t make the mistake of superscripting a lower case ‘o’. Instead, use one of these methods to insert a proper degree symbol in Microsoft Word:

• If you have a separate number pad, then press Alt+0176 (press and hold the Alt key while you type 0176)
• For any keyboard with or without a number pad, press Ctrl+Shift+@.
• Go to the Insert tab > Symbol — the degree symbol is character code = 00B0, Unicode (hex)
• If you have Math AutoCorrect turned on, then type \degree (to turn on Math AutoCorrect: File > Options > Proofing > AutoCorrect Options > Math AutoCorrect tab).

If you have a lot of superscripted lower case ‘o’ characters used instead of a proper degree symbols, you can search for them and replace them with the correct symbol:

1. Open the Find and Replace window (Ctrl+h).
2. In the ‘Find what’ field, type a lower case o.
3. With your cursor still in the ‘Find what’ field, click More.
4. Click Format and select Font.
5. Click the Superscript checkbox until it has a check mark in it.
6. Click OK to close the Find Font window.
7. Put your cursor in the ‘Replace with’ field.
8. Type ^0176
9. With your cursor still in the ‘Replace with’ field, click Format and select Font.
10. Click the Superscript checkbox until it is clear. You may have to click it twice.
11. Check your Find and Replace window looks like the screenshot below. If it does, click Find Next and then Replace for each one found.

Related: Prime and double prime symbols: https://cybertext.wordpress.com/2018/09/23/word-insert-a-prime-and-double-prime-characters/

## Word: Macro to set the language for ALL styles

September 21, 2018

One of the issues with setting the language for a Word document is that DOESN’T change the language set for the styles. If you’re lucky, your styles use the same language as your default language, but sometimes they don’t (especially if the document has come from authors in other countries). This can result in some strange behaviour under specific circumstances.

I have a macro for setting the language for all ‘ranges’ in a document, but I needed something to change the language settings for ALL styles in one command. After a bit of internet sleuthing, I came across an answer that looked promising and modified it to suit my purposes. It works! I tested it on a sample document, where I’d set the language for Normal to Alsatian, for Heading 1 to Afrikaans, and for Heading 2 to English (US). The only text I had in the document used Normal style, but that didn’t matter—the language settings for the styles still changed to the one I’d specified in the macro. In my case, that’s English (Australian) [in VBA code that’s wdEnglishAUS].

The only thing you need to change in this macro is the LanguageID. Here are some common ones for English:

• wdEnglishAUS
• wdNewZealand
• wdEnglishSouthAfrica
• wdEnglishUK
• wdEnglishUS.

Here’s the macro (copy it—some of it may go off the page, so if you type it you may miss some):

Sub ChangeLangStyles()

' Macro to change language in styles
' Adapted from Macropod (17 July 2012)

Dim oDoc As Document, oSty As Style
Set oDoc = ActiveDocument
With oDoc
For Each oSty In .Styles
On Error Resume Next
oSty.LanguageID = wdEnglishAUS
On Error GoTo 0
Next
End With
End Sub


I adapted it from one shared by Macropod back in July 2012: http://www.vbaexpress.com/forum/showthread.php?42993-Solved-Macro-to-change-all-styles-to-a-specific-language, and full acknowledgement goes to him.

## Word: Find ‘ing’ words and change their formatting

September 21, 2018

Tessa had a problem—she needed to find all words ending in ‘ing’ in her document and format the whole word in some way.

NOTE: This find/replace will find ALL words ending in ‘ing’, but not words ending in ‘ings’ or ‘ingly’. And words such as ‘going’, ‘bring’, ‘sing’, ‘king’, and ‘thing’ also get found. But if your aim is to find ALL words ending in ‘ing’ that’s what you’ll get.

Simplest solution: If you didn’t want the whole word to be formatted, just the ‘ing’ bit, then it’s easiest to use the standard find/replace, with the ‘Match Suffix’ option turned on. See Method 1 below.

However, if you want the whole words found and formatted, you’ll need to use wildcards. See Method 2 below.

## Method 1

1. Open the Find and Replace window (Ctrl+h).
2. Click More to see the extra search options.
3. In the ‘Find what’ field, type ing
4. Select the Match suffix checkbox.
5. Put your cursor in the ‘Replace with’ field, then click Format at the bottom of the window.
6. Click Font.
7. Select the formatting you want to apply to the found ‘ing’s—you can choose one or more options from this window. Then click OK to close the Font window. The formatting you selected is listed below the empty ‘Replace with’ field.
8. Click Find Next, then click Replace as many times as you need to be comfortable that the find/replace works as you want it to. If you’re happy with the matches, then click Replace All.

## Method 2

This method uses Word’s find and replace with wildcards.

1. Open the Find and Replace window (Ctrl+h).
2. Click More to see the extra search options.
3. Select the Use wildcards checkbox.
4. In the ‘Find what’ field, type <[A-Za-z]@ing>
5. Put your cursor in the ‘Replace with’ field, then click Format at the bottom of the window.
6. Click Font.
7. Select the formatting you want to apply to the found ‘ing’ words—you can choose one or more options from this window. Then click OK to close the Font window. The formatting you selected is listed below the empty ‘Replace with’ field.
8. Click Find Next, then click Replace as many times as you need to be comfortable that the find/replace works as you want it to. If you’re happy with the matches, then click Replace All.

How this wildcard find/replace works:

• < and > represent the start (<) and end (>) of a word (this specifies that you’re looking for a whole word)
• [A-Za-z] look for any upper any lower case letters
• @ing tells Word to repeat looking for upper/lower case letters until it finds ing

## What about ‘ing’ in the middle of a word?

Follow Steps 1 to 3 in Method 2 above, then in the ‘Find what’ field, type <[A-z]@ing[a-z]@>. Continue with Steps 5 to 8 above.

NOTE: You can’t format just a part of the replace (i.e. you can’t make just the ‘ing’ in ‘fringed’ red or bold)—it’s all or nothing.

## Outlook: Spellcheck not working

September 18, 2018

I was working on my laptop, which has Office 2016 installed on it. Spellcheck worked fine in Word, but when I was in Outlook, no spelling errors were flagged. When I looked at the spellcheck settings in Outlook, all options were greyed out and unavailable. I couldn’t turn it on or off, or change anything else.

I consulted Dr Google, and found that a possible reason was a different version of Outlook and Word (see https://answers.microsoft.com/en-us/msoffice/forum/msoffice_outlook-mso_other-mso_2016/outlook-2016-spellcheck-option-greyed-out/13c5c4f6-3735-4836-9e74-61eb9a6ddae5)

But I had installed Office 2016, so they should be the same version, right? And then I remembered something from way back when… When I installed Office 2016 on my laptop, I couldn’t connect to Exchange Server (which is part of Small Business Server [SBS] 2008) from Outlook. My IT guys told me the reason was that Outlook 2016 was incompatible with Exchange Server 2008, so with their help I’d uninstalled Outlook 2016 and reinstalled my earlier Outlook 2013.

I checked the properties of both Outlook and Word to see which version I was using. Unfortunately, Microsoft no longer has an ‘About’ option; instead, go to File > Account or Help and you should be able to find your version. If they are different (i.e. Outlook’s version starts with 14 [Office 2010], or 15 [Office 2013] and the Word version starts with 16 [Office 2016]), you now know that spellcheck won’t work in Outlook.

Personally, I think this is a bug. If the proofing tools (i.e. spellcheck) are associated with a version folder on the PC, then it shouldn’t matter whether you’ve opened Word or Outlook—the programs should use the proofing tools specific to that version. Yes, the words you’ve added to each may not be available to the other, but they should still point to the applicable proofing tools for the version. However, according to the information in the link above, it’s winword.exe that’s loaded for the spellcheck, NOT the proofing tools. So if winword.exe is in a different Office folder to Outlook (e.g. office 16 versus Office 15), Outlook can’t find the spellcheck tools. Go figure.