Share via


DocumentBase.CanCheckin 메서드

Microsoft Office Word에서 문서를 서버에 체크 인할 수 있는지 여부를 확인합니다.

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

구문

‘선언
Public Function CanCheckin As Boolean
public bool CanCheckin()

반환 값

형식: System.Boolean
Microsoft Office Word에서 문서를 서버에 체크 인할 수 있으면 true이고 그렇지 않으면 false입니다.

설명

Word에 기본 제공되는 공동 작업 기능을 활용하려면 문서를 Microsoft SharePoint Portal Server에 저장해야 합니다.

예제

다음 코드 예제에서는 CanCheckin 메서드를 사용하여 문서가 Microsoft SharePoint Portal Server에 저장되었는지 여부를 확인합니다. 문서가 서버에 저장되었으면 CheckIn 메서드를 호출하여 문서를 체크 인하고 변경 내용을 서버 위치에 저장한 다음 승인 과정을 위해 문서를 제출합니다. 이 예제를 사용하려면 문서 수준 프로젝트 ThisDocument 클래스에서 실행하십시오.

Private Sub DocumentCheckIn()
    If CanCheckin() = True Then
        Me.CheckIn(True, "My updates.", True)
    Else
        MessageBox.Show("This document cannot be checked in")
    End If
End Sub
private void DocumentCheckIn()
{
    if (this.CanCheckin())
    {
        object comments = "My updates.";
        this.CheckIn(true, ref comments, true);
    }
    else
    {
        MessageBox.Show("This document cannot be checked in");
    }
}

.NET Framework 보안

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

참고 항목

참조

DocumentBase 클래스

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