回傳一個 語言集合, 代表 語言對話框 中列出的校樣語言。
語法
expression。 Languages
expression 代表 Application 物件的變數。
註解
關於回傳集合中單一成員的資訊,請參見 從集合回傳物件。
範例
本範例會傳回使用中拼字檢查字典的檔案路徑及檔案名稱。
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
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。