返回或设置用来定义菜单语言的对象的语言设置。Language 属性使用 String 类型值来代表 ISO 语言标记。例如,字符串“EN-US”代表“美国 - 英语”的 ISO 代码。可读写。
expression.Language
expression 必选。该表达式返回“应用于”列表中的一个对象。
如果指定了有效的语言代码,对象将只在指定语言类型的“视图”菜单中可用。如果未指定值,则该对象对所有语言类型都可用。该属性的默认值是个空 String。
以下示例将所有 olTableView 类型的 View 对象的语言类型设置为美国英语。
Sub SetLanguage()
'Sets the language of all table views to US English
Dim olApp As Outlook.Application
Dim objViews As Views
Dim objView As View
Set olApp = Outlook.Application
Set objViews = _
olApp.GetNamespace("Mapi").GetDefaultFolder(olFolderInbox).Views
'Iterate through each view in the collection
For Each objView In objViews
'If view is of type olTableVIew then set language
If objView.ViewType = olTableView Then
objView.Language = "EN-US"
End If
Next objView
End Sub