DocumentBase.Paragraphs Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient une collection Paragraphs qui représente tous les paragraphes dans le document.
public Microsoft.Office.Interop.Word.Paragraphs Paragraphs { get; }
Valeur de propriété
Collection Paragraphs qui représente tous les paragraphes dans le document.
Exemples
L’exemple de code suivant ajoute du texte au premier paragraphe du document. Pour utiliser cet exemple, exécutez-le à partir de la ThisDocument classe dans un projet au niveau du document.
private void DocumentParagraphs()
{
this.Paragraphs[1].Range.InsertParagraphBefore();
this.Paragraphs[1].Range.Text = "This is sample paragraph text.";
}
Private Sub DocumentParagraphs()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Me.Paragraphs(1).Range.Text = "This is sample paragraph text."
End Sub