Microsoft® Excel® based database addin

 

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Julian Ladbury Guest

    Default Word 2007: Custom Dictionary stays in list after Dictionary.Delete

    I want to create and add a Custom Dictionary when my document opens, then
    delete it when it closes. All works fine in Word XP and 2003, but not in 2007
    and 2010 beta.

    This is the code I have used to investigate the problem I have found:

    ' dictionary is created before this bit of code runs

    Dim dictionaryName As String
    dictionaryName = "C:\Documents and Settings\Lenny\Application
    Data\Microsoft\UProof\Test.dic" ' Word 2007, Windows XP
    ' "C:\Documents and Settings\Lenny\Application
    Data\Microsoft\Proof\Test.dic" ' Word XP or 2003, Windows XP
    CustomDictionaries.Add dictionaryName
    CustomDictionaries(dictionaryName).Delete
    Kill dictionaryName

    In Word XP and Word 2003, all works as expected. By the time the code
    finishes, there is no trace of the dictionary in the list at Tools > Options
    > Spelling and Grammar > Custom Dictionaries.


    In Word 2007 and Word 2010 beta the custom dictionary remains in the list in
    Word Options > Proofing > Custom Dictionaries, albeit unchecked.

    I have stepped through the code and find that in all versions the dictionary
    becomes unchecked in the list after the
    'CustomDictionaries(dictionaryName).Delete' statement. in In Word XP and 2003
    it is removed from the list after the 'Kill dictionaryName' statement, but
    that is not the case with 2007 or 2010 beta.

  2. #2
    Colbert Zhou [MSFT] Guest

    Default RE: Word 2007: Custom Dictionary stays in list after Dictionary.Delete

    Hello Julian,

    Thanks for your posting! I am sorry for following up late on the thread.
    Actually I was on leave in the last 3 days for Chinese Spring Festival. I
    just read this post and I am trying to reproduce it and investigate. I will
    update as soon as possible.


    Best regards,
    Ji Zhou
    Microsoft Online Community Support


  3. #3
    Colbert Zhou [MSFT] Guest

    Default RE: Word 2007: Custom Dictionary stays in list after Dictionary.Delete

    Hello Julian,

    Based on my researches, the followings are my founds,

    The Kill statement is used to delete files in VBA language. I did not have
    a Word 2003 to test, but from your description, it seems, as long as the
    dictionary file is deleted from the system, then the custom dictionary is
    removed from the list in Word XP and 2003.

    I test in my Word 2007 and Word 2010 beta2. I can see the issue you
    mentioned. After some investigations, I found Word uses some values in
    registry key,
    "HKCU\Software\Microsoft\Shared Tools\Proofing Tools\1.0\Custom
    Dictionaries"
    to control the dictionaries list in Word.

    Each dictionary entry are mapped to two values. In my side,
    1 MyDic.DIC (Dictionary Name)
    1_state 01 (Dictionary State)

    You can verify this registry key in your side. So my suggestion is if we
    want to remove a custom dictionary from the list in Word option, we need to
    delete two corresponding values from that registry key using VBA codes.

    Hope this helps and wish you a good day! :-)

    Best regards,
    Ji Zhou
    Microsoft Online Community Support



  4. #4
    Julian Ladbury Guest

    Default RE: Word 2007: Custom Dictionary stays in list after Dictionary.De

    Hi Colbert,

    No problem with the slow reply, I have been away myself. Thanks for your
    input.

    Following further problems with adding and deleting dictionaries I decided
    that the user benefit was not worth the coding effort and am hence happy not
    to pursue this any more. However, I would suggest that the Office team should
    a) be made aware of this undocumented change in behaviour bewteen releases
    and b) update the documentation appropriately where possible to avoid others
    having to tread the same path.

Similar Threads

  1. location of word dictionary
    By word dictionary help in forum Programming - VBA for Office (Not Excel Specific)
    Replies: 3
    Last Post: 08-05-2009, 11:12 AM
  2. Outlook problem ("no custom dictionary exist")
    By Sanjay in forum Miscellaneous Excel Subjects
    Replies: 2
    Last Post: 08-04-2009, 06:22 PM
  3. Delete from Excel dictionary(not voice)
    By Davehiphop in forum New Excel Users Forum
    Replies: 1
    Last Post: 01-26-2009, 07:33 PM
  4. Insert word from dictionary
    By Ed in forum Programming (VBA, VB, C# etc)
    Replies: 1
    Last Post: 01-21-2009, 07:52 AM
  5. Outlook problem ("no custom dictionary exist")
    By Sanjay in forum Miscellaneous Excel Subjects
    Replies: 1
    Last Post: 12-07-2008, 12:09 AM

Bookmarks

Posting Permissions

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