Bookmark.Cells, propriété (System 2007)

Mise à jour : novembre 2007

Obtient une collection Cells qui représente les cellules de tableau dans un contrôle Bookmark.

Espace de noms :  Microsoft.Office.Tools.Word
Assembly :  Microsoft.Office.Tools.Word.v9.0 (dans Microsoft.Office.Tools.Word.v9.0.dll)

Syntaxe

<BrowsableAttribute(False)> _
Public ReadOnly Property Cells As Cells

Dim instance As Bookmark
Dim value As Cells

value = instance.Cells
[BrowsableAttribute(false)]
public Cells Cells { get; }

Valeur de propriété

Type : Microsoft.Office.Interop.Word.Cells

Collection Cells qui représente les cellules de tableau dans un contrôle Bookmark.

Exemples

L'exemple de code suivant ajoute au document un tableau de trois colonnes et trois lignes, puis ajoute un contrôle Bookmark au tableau. Enfin, le code modifie la largeur des cellules du tableau dans le signet.

Cet exemple illustre une personnalisation au niveau du document.

Private Sub BookmarkCells()

    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.Cells.Width = Application.InchesToPoints(1)
    End If

End Sub
private void BookmarkCells()
{
    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.Cells.Width = Application.InchesToPoints(1);
    }
}

Autorisations

Voir aussi

Référence

Bookmark, classe

Membres Bookmark

Microsoft.Office.Tools.Word, espace de noms