InsertRowsAbove 方法 (Word)Selection.InsertRowsAbove method (Word)

在当前选定内容上方插入行。Inserts rows above the current selection.

语法Syntax

expression.expression. InsertRowsAbove

_表达式_是必需的。expression Required. 表示 Selection 对象的变量。A variable that represents a Selection object.

备注Remarks

Microsoft Word 可在当前选定内容中插入任意数量的行。Microsoft Word inserts as many rows as there are in the current selection.

要使用此方法,当前所选内容必须处于表格中。To use this method, the current selection must be in a table.

示例Example

本示例选定表 1 的第 2 行,在其上方插入一新行。This example selects the second row in the first table and inserts a new row above it.

ActiveDocument.Tables(1).Rows(2).Select 
Selection.InsertRowsAbove

另请参阅See also

Selection 对象Selection Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.