Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 1.23 KB

Word.Selection.InsertRows.md

File metadata and controls

57 lines (33 loc) · 1.23 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Selection.InsertRows method (Word)
vbawd10.chm158663184
vbawd10.chm158663184
Word.Selection.InsertRows
326ad049-4d39-1ca6-a203-ddba0e77cba4
06/08/2017
medium

Selection.InsertRows method (Word)

Inserts the specified number of new rows above the row that contains the selection. If the selection isn't in a table, an error occurs.

Syntax

expression. InsertRows( _NumRows_ )

expression Required. A variable that represents a Selection object.

Parameters

Name Required/Optional Data type Description
NumRows Optional Variant The number of rows to be added.

Remarks

You can also insert rows by using the Add method of the Rows object.

Example

This example inserts two new rows above the row that contains the selection, and then it removes the borders from the new rows.

If Selection.Information(wdWithInTable) = True Then 
 Selection.InsertRows NumRows:=2 
 Selection.Borders.Enable =False 
End If

See also

Selection Object

[!includeSupport and feedback]