Bookmark.Previous(Object, Object) Yöntem

Tanım

RangeDenetime göre bir nesne alır Bookmark .

public Microsoft.Office.Interop.Word.Range Previous (ref object Unit, ref object Count);

Parametreler

Count
Object

Geri taşımak istediğiniz birim sayısı. Varsayılan değer 1’dir.

Döndürülenler

Range

RangeDenetime göre bir nesne Bookmark .

Örnekler

Aşağıdaki kod örneği, ilk paragrafa metin ekler ve sonra Bookmark ikinci sözcüğe bir denetim ekler. Kod sonra yer işaretinin önceki sözcüğünü seçer.

Bu örnek, belge düzeyinde özelleştirme içindir

private void BookmarkPrevious()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    this.Paragraphs[1].Range.Text = "Text before the bookmark.";
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range.Words[2],
        "bookmark1");
    
    object Unit = Word.WdUnits.wdWord;
    object Count = 1;

    bookmark1.Previous(ref Unit, ref Count).Select();
}
Private Sub BookmarkPrevious()

    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Me.Paragraphs(1).Range.Text = "Text before the bookmark."

    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range.Words(2), _
        "Bookmark1")
    
    Bookmark1.Previous(Word.WdUnits.wdWord, 1).Select()

End Sub

Açıklamalar

İsteğe Bağlı Parametreler

İsteğe bağlı parametreler hakkında daha fazla bilgi için bkz. Office çözümlerinde Isteğe bağlı parametreler.

Şunlara uygulanır