Activating a custom dictionary (Word 2010/2013) RRS feed

  • Question

  • I've been experimenting with generating custom dictionaries using VBA, fairly successfully. What I can't figure out is how to activate/deactivate these dictionaries. This would be the equivalent of checking/unchecking the box next to the dictionary in the custom dictionaries dialog. Doing this with the Macro Recorder on results in an empty macro (which may be a bad sign). As far as I can tell, it simply doesn't work as the documentation suggests.

    What I'm seeing:

    - I have two custom dictionaries: CUSTOM.DIC (the default) and MyCustDict.dic (my generated dictionary). I have manually unchecked MyCustDict. In this scenario, CustomDictionaries.Count = 1 (expected), but I can still access CustomDictionaries(2).Name (MyCustDict.dic). Adding MyCustDict to the CustomDictionaries collection has no effect; I don't get an error but the value of .Count also remains the same. Trying to set the ActiveCustomDictionary also does nothing, as far as I can tell (adding either my dictionary or the CUSTOM.DIC one). If I run CustomDictionaries.ClearAll, the count becomes 0 (expected), but at that point there seems to be no way to, programatically, make either dictionary active again. The dialog box shows the change; both dictionaries are now unchecked.

    So, is there a step or concept I'm missing, or is this just a broken feature in VBA? Do I need to direct the user to manually check/uncheck dictionaries?

    Monday, May 18, 2015 3:02 PM