Bookmark.InsertCaption(Object, Object, Object, Object, Object) 메서드

정의

Bookmark 컨트롤의 바로 앞이나 뒤에 캡션을 삽입합니다.

public void InsertCaption (ref object Label, ref object Title, ref object TitleAutoText, ref object Position, ref object ExcludeLabel);
abstract member InsertCaption : obj * obj * obj * obj * obj -> unit
Public Sub InsertCaption (ByRef Label As Object, Optional ByRef Title As Object, Optional ByRef TitleAutoText As Object, Optional ByRef Position As Object, Optional ByRef ExcludeLabel As Object)

매개 변수

Label
Object

삽입할 캡션 레이블입니다. WdCaptionLabelID.

Title
Object

캡션 레이블 바로 뒤에 삽입할 텍스트입니다(가 지정된 경우 TitleAutoText 무시됨).

TitleAutoText
Object

캡션 레이블 바로 뒤에 삽입할 내용이 있는 상용구 항목입니다(에서 지정한 Title텍스트를 재정의).

Position
Object

캡션이 Bookmark 컨트롤 위에 삽입되는지 아래에 삽입되는지를 지정합니다. WdCaptionPosition.

ExcludeLabel
Object

true 매개 변수에 정의된 대로 텍스트 레이블을 포함하지 않도록 합니다 Label . 지정된 레이블을 포함하려면 false입니다.

예제

다음 코드 예제에서는 텍스트가 있는 Bookmark 컨트롤을 문서에 추가한 다음 책갈피에 캡션 삽입합니다.

이 예제는 문서 수준 사용자 지정을 위한 것입니다.

private void BookmarkInsertCaption()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "First bookmark";

    object Label = Word.WdCaptionLabelID.wdCaptionFigure;
    object Position = Word.WdCaptionPosition.wdCaptionPositionAbove;
    object ExcludeLabel = false;

    bookmark1.InsertCaption(ref Label, ref missing, ref missing,
        ref Position, ref ExcludeLabel);
}
Private Sub BookmarkInsertCaption()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
    Bookmark1.Text = "First bookmark"

    Bookmark1.InsertCaption(Label:=Word.WdCaptionLabelID.wdCaptionFigure, _
        Position:=Word.WdCaptionPosition.wdCaptionPositionAbove, _
        ExcludeLabel:=False)

End Sub

설명

선택적 매개 변수

선택적 매개 변수에 대한 자세한 내용은 Office 솔루션의 선택적 매개 변수를 참조하세요.

적용 대상