Share via


Bookmark.Rows Property (2007 System)

Gets a Rows collection that represents all the table rows in a Bookmark control.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Rows As Rows
'Usage
Dim instance As Bookmark 
Dim value As Rows 

value = instance.Rows
[BrowsableAttribute(false)]
public Rows Rows { get; }
[BrowsableAttribute(false)]
public:
property Rows^ Rows {
    Rows^ get ();
}
public function get Rows () : Rows

Property Value

Type: Rows
A Rows collection that represents all the table rows in a Bookmark control.

Examples

The following code example adds a three-column, three-row table to the document, adds a Bookmark control to the table, then changes the height of the first row within the bookmark.

This example is for a document-level customization.

Private Sub BookmarkRows()

    Dim myTable As Word.Table
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    myTable = Me.Tables.Add(Me.Paragraphs(1).Range, 3, 3)
    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(myTable.Range, "Bookmark1")

    If Bookmark1.Tables.Count > 0 Then
        Bookmark1.Rows(1).Height = Application.InchesToPoints(1)
    End If 

End Sub
private void BookmarkRows()
{
    Word.Table myTable;

    this.Paragraphs[1].Range.InsertParagraphBefore();
    myTable = this.Tables.Add(this.Paragraphs[1].Range,
        3, 3, ref missing, ref missing);
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(myTable.Range,
        "bookmark1");
    if (bookmark1.Tables.Count > 0)
    {
        bookmark1.Rows[1].Height = Application.InchesToPoints(1);
    }
}

.NET Framework Security

See Also

Reference

Bookmark Class

Bookmark Members

Microsoft.Office.Tools.Word Namespace