Share via


DocumentBase.Final 속성

문서가 최종본인지 여부를 나타내는 값을 가져오거나 설정합니다.

네임스페이스:  Microsoft.Office.Tools.Word
어셈블리:  Microsoft.Office.Tools.Word.v4.0.Utilities(Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

구문

‘선언
Public Property Final As Boolean
    Get
    Set
public bool Final { get; set; }

속성 값

형식: System.Boolean
문서가 최종본이면 true이고, 그렇지 않으면 false입니다.

설명

이 속성을 true로 설정하면 Microsoft Office Word에서는 문서를 최종본으로 표시하고, 받는 사람(있는 경우)에게 해당 문서가 최종본임을 알리고, 문서를 읽기 전용으로 설정합니다.

예제

다음 코드 예제에서는 현재 문서의 Final 속성을 가져옵니다. 문서가 아직 최종 버전이 아니면 이 코드에서는 사용자에게 문서가 최종 버전이 아님을 알리는 메시지를 표시한 다음 Final 속성을 true로 설정합니다. 문서가 최종 버전으로 표시되기 전에도 메시지가 표시됩니다. 문서가 이미 최종 버전이면 이 코드에서는 사용자에게 문서가 이미 최종 버전임을 알리는 메시지를 표시합니다. 이 예제를 사용하려면 문서 수준 프로젝트 ThisDocument 클래스에서 실행하십시오.

Private Sub SetDocumentToFinal()
    If Me.Final = False Then
        MessageBox.Show("The current document is not final. " + _
                        "Setting it to be final.")
        Me.Final = True
    Else
        MessageBox.Show("The current document is final.")
    End If
End Sub
private void SetDocumentToFinal()
{
    if (this.Final == false)
    {
        MessageBox.Show("The current document is not final. Setting " 
            + "it to be final.");
        this.Final = true;
    }
    else
    {
        MessageBox.Show("The current document is final.");
    }
}

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

DocumentBase 클래스

Microsoft.Office.Tools.Word 네임스페이스