Consulting

Results 1 to 3 of 3

Thread: Solved: Dictionary help required

  1. #1

    Solved: Dictionary help required

    Whaddaya know? My third thread starter in one week. Thanks for all the help, people.

    This time, I'm having trouble declaring a Dictionary object.

    I've seen the code in other forums and it goes something like:

    dim mydictionary as new dictionary

    Well, whenever I do that, I get the literal dictionary (you know, the one with entries and definitions and pronunciation keys?).

    I did include a reference to Microsoft Scripting Runtime Library so why I should be stuck with a lexicon is beyond me.

    Any takers?

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    Having added a reference to Microsoft Scripting Runtime Library, you need to make you declaration from that object:
    Dim mydictionary As New Scripting.Dictionary

    Dim mydictionary As New Dictionary creates a new dictionary item in Word's Dictionaries collection (of custom dictionaries), hence the confusion
    K :-)

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Hi Cunny,

    Glad to see VBAX can help you.
    Would you be so kind to reply to your previous post or mark it solved if it has been?

    Seams to me Killian is spot on whit his answer. If you need more detail please howler..
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

Posting Permissions

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