Bookmark.ParagraphFormat-Eigenschaft (2007 System)
Aktualisiert: November 2007
Ruft ein Microsoft.Office.Interop.Word.ParagraphFormat-Objekt ab, das die Absatzeinstellungen für das Bookmark-Steuerelement darstellt, oder legt dieses Objekt fest.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)
Syntax
<BrowsableAttribute(False)> _
Public Property ParagraphFormat As ParagraphFormat
Dim instance As Bookmark
Dim value As ParagraphFormat
value = instance.ParagraphFormat
instance.ParagraphFormat = value
[BrowsableAttribute(false)]
public ParagraphFormat ParagraphFormat { get; set; }
Eigenschaftenwert
Typ: Microsoft.Office.Interop.Word.ParagraphFormat
Ein Microsoft.Office.Interop.Word.ParagraphFormat-Objekt, das die Absatzeinstellungen für das Bookmark-Steuerelement darstellt.
Beispiele
Im folgenden Codebeispiel wird dem ersten Absatz ein Bookmark-Steuerelement mit Text hinzugefügt und das Absatzformat des Lesezeichens so festgelegt, dass ein SpaceBefore mit einer Breite von 1 Zoll eingefügt wird.
Dieses Beispiel bezieht sich auf eine Anpassung auf Dokumentebene.
Private Sub BookmarkParagraphFormat()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
Bookmark1.Text = "This is sample bookmark text."
Bookmark1.ParagraphFormat.SpaceBefore = _
Application.InchesToPoints(1)
End Sub
private void BookmarkParagraphFormat()
{
this.Paragraphs[1].Range.InsertParagraphBefore();
Microsoft.Office.Tools.Word.Bookmark bookmark1 =
this.Controls.AddBookmark(this.Paragraphs[1].Range,
"bookmark1");
bookmark1.Text = "This is sample bookmark text.";
bookmark1.ParagraphFormat.SpaceBefore = Application.InchesToPoints(1);
}
Berechtigungen
- Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter Verwenden von Bibliotheken aus teilweise vertrauenswürdigem Code.