Microsoft KB Archive/938041

= Error message when you run a macro that uses the custom dictionary name as the index in the &quot;CustomDictionaries&quot; method in Word 2007: &quot;Run-time error 5941: The requested member of the collection does not exist&quot; =

Article ID: 938041

Article Last Modified on 6/7/2007

-

APPLIES TO


 * Microsoft Office Word 2007

-



SYMPTOMS
In Microsoft Office Word 2007, you run a macro that uses a custom dictionary name as the index in the CustomDictionaries method. When you do this, you receive the following error message:

Run-time error 5941: The requested member of the collection does not exist

Note This issue does not occur in Microsoft Office Word 2003.



WORKAROUND
To work around this problem, use an index number that refers to the custom dictionary in the CustomDictionaries method.

The following code provides an example of an index number that is used to refer to the custom dictionary in the CustomDictionaries method. For the default custom dictionary, the index number is 1. Sub test Application.CustomDictionaries.ActiveCustomDictionary = Application.CustomDictionaries(1) End Sub



STATUS
Microsoft has confirmed that this is a problem in Word 2007.

Additional query words: WD2007

Keywords: kbexpertiseinter kbtshoot kbprb KB938041

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.