Dictionaries object (Word)
A collection of Dictionary objects that includes the active custom spelling dictionaries.
Remarks
Use the CustomDictionaries property to return the collection of currently active custom dictionaries. The following example displays the names of all the active custom dictionaries.
For Each d In CustomDictionaries
Msgbox d.Name
Next d
Use the Add method to add a new custom dictionary to the collection of active custom dictionaries. If there isn't a file with the name specified by FileName, Word creates it. The following example adds "MyCustom.dic" to the collection of custom dictionaries.
CustomDictionaries.Add FileName:="MyCustom.dic"
Use the ClearAll method to unload all custom dictionaries. Note, however, that this method doesn't delete the dictionary files. After you use this method, the number of custom dictionaries in the collection is 0 (zero). The following example clears the custom dictionaries and creates a new custom dictionary file. The new dictionary is set as the active custom dictionary, to which Word will automatically add any new words it encounters.
With CustomDictionaries
.ClearAll
.Add FileName:= "MyCustom.dic"
.ActiveCustomDictionary = CustomDictionaries(1)
End With
Remarks
You set the custom dictionary to which new words are added by using the ActiveCustomDictionary property. If you try to set this property to a dictionary that isn't a custom dictionary, an error occurs.
The Maximum property returns the maximum number of simultaneous custom spelling dictionaries that the application can support. For Word, this maximum is 10.
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기