TableView.MultiLineWidth 属性 (Outlook)

返回或设置一个 Long 类型,表示需要触发多行模式的 对象中的文本宽度 (以字符为单位)。 读/写

语法

expressionMultiLineWidth

表达 一个代表 TableView 对象的变量。

备注

此属性可以设置为 1 和 999 之间的值。 如果此属性设置为小于 1 的值,则会将此属性设置为 1。 如果此属性设置为大于 999 的值,则会将此属性设置为 999。 此属性的默认值为 100。

仅当 TableView 对象的 Multiline 属性设置为 olWidthMultiLine 时,此属性才适用。 MultiLineWidth 属性的值确定在多行模式下 Outlook 项目的文本在 TableView 对象中的显示宽度。

示例

下面的 Visual Basic for Applications (VBA) 示例对当前的 TableView 对象进行配置,以便当视图中的文本超过 50 个字符时文本将在多行模式下显示。 除非 AutomaticColumnSizing 属性设置为 True,否则 MultiLine 属性不能设置为 olWidthMultiLine

Private Sub ConfigureMultiLineView() 
 
 Dim objTableView As TableView 
 
 
 
 If Application.ActiveExplorer.CurrentView.ViewType = _ 
 
 olTableView Then 
 
 
 
 ' Obtain a TableView object reference for the 
 
 ' current table view. 
 
 Set objTableView = _ 
 
 Application.ActiveExplorer.CurrentView 
 
 
 
 With objTableView 
 
 ' Set the TableView object so that, 
 
 ' if the text in the view is longer 
 
 ' than 50 characters, the text is 
 
 ' displayed in multiline mode. 
 
 .AutomaticColumnSizing = True 
 
 .MultiLine = olWidthMultiLine 
 
 .MultiLineWidth = 50 
 
 
 
 ' Save the table view. 
 
 .Save 
 
 End With 
 
 End If 
 
End Sub

另请参阅

表对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。