Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Sep 2005
    Location
    Poughkeepsie, New York, USA
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom Dictionaries in Word 2003 (Word 2003)

    <P ID="edit" class=small>(Edited by jscher2000 on 24-Sep-05 17:35. Link to Lounge help changed to help smiley (I think this is what was intended).)</P> <img src=/S/help.gif border=0 alt=help width=23 height=15> I have multiple custom dictionaries, several of which are active simultaneously depending on the project I am working on. For example, I have one for chemical compounds, one for animal species, one for plant species, and one for drugs, as well as the default Custom.dic. I was unable to figure out how to write a macro in VBA that would let me add a word to the custom dictionary of my choice, avoiding the need to go the multiple-step route through Tools > Options, etc. Consequently, I wrote a macro that works outside Word (using Macro Express) that copies the word to the clipboard, opens the custom dictionary I want it added to, pastes the word, and saves the .dic file as a plain text file. But the rub is that even though the word is now in the dictionary, spellchecker won't accept the word until I go to Tools > Options > Spelling & Grammar > Custom Dictionaries, have the dialog box on my screen, and then cancel. (That is, I do not have to open the custom dictionary or select it or anything -- almost like refreshing the file.) Is there a way to directly access this screen by assigning a keyboard combination? Or is there a way to have spell check recognize the new entry without having to open the dictionary dialog window? Or does someone know how to write a VBA macro that would let me list in a menu all of my custom dictionaries and select which dictionary I want to add the word to without making it my default? Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Custom Dictionaries in Word 2003 (Word 2003)

    > Or is there a way to have spell check recognize the new entry without having to open the dictionary dialog window?

    How about clearing and reloading all your custom dictionaries with code like this...
    <code>
    Sub ReloadDictionaries()

    Dim strDicNames() As String
    Dim dicLoop As Dictionary
    Dim i As Integer

    ReDim strDicNames(Application.CustomDictionaries.Count)
    i = 0

    For Each dicLoop In Application.CustomDictionaries
    i = i + 1
    strDicNames(i) = Application.CustomDictionaries(i).Path & _
    Application.PathSeparator & _
    Application.CustomDictionaries(i).Name
    Next dicLoop

    Application.CustomDictionaries.ClearAll

    For i = 1 To UBound(strDicNames)
    Application.CustomDictionaries.Add strDicNames(i)
    Next i

    End Sub
    </code>
    StuartR

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Re: Custom Dictionaries in Word 2003 (Word 2003)

    I use one custom dictionary and it is stored as an ASCII file in alphabetical order. When I want to add a word, I just open it in Wordpad. I don't know if all custom dictionaries are stored that way but you might want to check.

    Ronny
    Ronny Richardson

  4. #4
    2 Star Lounger
    Join Date
    Sep 2005
    Location
    Poughkeepsie, New York, USA
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Dictionaries in Word 2003 (Word 2003)

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> Stuart, thank you. It works perfectly. I admit I'm not very good at writing macros in VBA, which is why I ended up creating the macro in MacroExpress. But this last bit had me stymied and your suggested code works like a charm. I have assigned the text to a keyboard combination that MacroExpress calls and it works great. I appreciate your help.

    Rich Adin

  5. #5
    2 Star Lounger
    Join Date
    Sep 2005
    Location
    Poughkeepsie, New York, USA
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Dictionaries in Word 2003 (Word 2003)

    Thanks for the suggestion, Ronny. Unfortunately, that won't help me. We are book editors and find that we have to keep multiple custom dictionaries of custom terms. It was frustrating having to do it by having a single custom dictionary for each project when the terms may appear in multiple projects (we primarily work on medical and hard science books). Stuart's solution to the reloading problems was just what I needed to complete the process and make it work automatically.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •