مشاركة عبر


Bookmark.Relocate أسلوب

في عرض "مخطط تفصيلي"، قم بنقل الفقرات داخل Bookmarkالتحكم بعد الفقرة التالية مرئي أو قبل السابقة الفقرة مرئياً.

مساحة الاسم:  Microsoft.Office.Tools.Word
التجميع:  Microsoft.Office.Tools.Word (في Microsoft.Office.Tools.Word.dll)

بناء الجملة

'إقرار
Sub Relocate ( _
    Direction As Integer _
)
void Relocate(
    int Direction
)

المعلمات

ملاحظات

ينقل نص أساسي بعنوان إلا إذا نص أساسي هو مطوية في عرض مخطط تفصيلي أو إذا كان ذلك هو جزءا من Bookmarkعنصر التحكم.

أمثلة

يضيف مثال التعليمة البرمجية التالية إلى النص أول فقرة، ثم Bookmarkالتحكم بالنص إلى فقرة الثاني. تعليمات برمجية ثم relocates بإشارة مرجعية الثاني أول الفقرة.

Th هو المثال هو لتخصيص المستوى مستند.

Private Sub BookmarkRelocate()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Me.Paragraphs(1).Range.Text = "This is sample text. "

    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(2).Range, "Bookmark1")
    Bookmark1.Text = "This is the text of the bookmark."

    Me.ActiveWindow.View.Type = Word.WdViewType.wdOutlineView
    Bookmark1.Relocate(Word.WdRelocate.wdRelocateUp)
End Sub
private void BookmarkRelocate()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    this.Paragraphs[1].Range.InsertParagraphBefore();
    this.Paragraphs[1].Range.Text = "This is sample text. ";
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[2].Range,
        "bookmark1");
    bookmark1.Text = "This is the text of the bookmark.";

    this.ActiveWindow.View.Type = Word.WdViewType.wdOutlineView;
    bookmark1.Relocate((int)Word.WdRelocate.wdRelocateUp);
}

أمن NET Framework.

راجع أيضًَا

المرجع

Bookmark واجهة

Bookmark الأعضاء

Microsoft.Office.Tools.Word مساحة الاسم