Table of contents
TOC
折叠目录
展开目录

Selection.TableCellRange 属性 (发布服务器)Selection.TableCellRange Property (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回表示所选的表中的单元格的矩形对象。Returns a CellRange object that represents the cells in a table selection.

语法Syntax

表达式TableCellRangeexpression. TableCellRange

表示选定对象的 _expression_A 变量。_expression_A variable that represents a Selection object.

返回值Return Value

矩形CellRange

示例Example

以下示例填充选定内容中的表格单元格。This example fills the table cells in a selection.

Sub FillTableCellRange() 
 Dim intCount As Integer 
 With Selection 
 If .Type = pbSelectionTableCells Then 
 With .TableCellRange 
 For intCount = 1 To .Count 
 .Item(intCount).Fill.ForeColor.RGB = RGB _ 
 (Red:=0, Green:=255, Blue:=255) 
 Next intCount 
 End With 
 End If 
 End With 
End Sub
© 2018 Microsoft