DocumentBase.CurrentRsid 속성

Microsoft Office Word에서 문서의 변경 내용에 할당하는 난수를 가져옵니다.

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

구문

‘선언
Public ReadOnly Property CurrentRsid As Integer
    Get
public int CurrentRsid { get; }

속성 값

형식: System.Int32
Microsoft Office Word에서 문서의 변경 내용에 할당하는 난수입니다.

설명

Options 속성의 StoreRSIDOnSave 속성이 true이면 Word에서는 문서가 저장될 때마다 응용 프로그램에서 문서 비교 및 병합을 쉽게 하기 위해 사용하는 난수를 생성합니다. Word에서는 이 난수를 표에 저장하고 문서가 저장될 때마다 이 표를 업데이트합니다. CurrentRsid 속성은 Word에서 문서에 할당한 마지막 번호를 반환합니다.

예제

다음 코드 예제에서는 CurrentRsid 속성 값을 보여 주는 메시지 상자를 표시합니다. 또한 첫 번째 단락에 텍스트를 추가하고 문서를 저장한 다음 CurrentRsid 속성의 수정된 값을 보여 주는 두 번째 메시지 상자를 표시합니다. 이 예제를 사용하려면 문서 수준 프로젝트 ThisDocument 클래스에서 실행하십시오.

Private Sub GetDocumentCurrentRsid()
    MessageBox.Show("CurrentRsid value before saving changes: " _
                    + Me.CurrentRsid.ToString())
    Me.Paragraphs(1).Range.Text = "Inserting some text..."
    Me.Save()
    MessageBox.Show("CurrentRsid value after saving changes: " _
                    + Me.CurrentRsid.ToString())
End Sub
private void GetDocumentCurrentRsid()
{
    MessageBox.Show("CurrentRsid value before saving changes: " 
        + this.CurrentRsid.ToString());
    this.Paragraphs[1].Range.Text = "Inserting some text...";
    this.Save();
    MessageBox.Show("CurrentRsid value after saving changes: " 
        + this.CurrentRsid.ToString());
}

.NET Framework 보안

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

참고 항목

참조

DocumentBase 클래스

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