返回一个 Languages 集合,该集合代表列在“语言”对话框(在“工具”菜单上,单击“语言”,再单击“设置语言”)中的校对语言。
expression.Languages
expression 必需。该表达式返回“应用于”列表中的一个对象。
有关返回集合中单独成员的信息,请参阅返回集合中的对象。
本示例返回活动拼写词典的完整路径和文件名。
Dim dicSpell As Dictionary
Set dicSpell = _
Languages(Selection.LanguageID).ActiveSpellingDictionary
MsgBox dicSpell.Path & Application.PathSeparator & dicSpell.Name
本示例用 aLang()
数组来存储校对语言的名称。
Dim intCount As Integer
Dim langLoop As Language
Dim aLang(Languages.Count - 1) As String
intCount = 0
For Each langLoop In Languages
aLang(intCount) = langLoop.NameLocal
intCount = intCount + 1
Next langLoop