Share via


DocumentBase.Compatibility 속성

지정된 호환성 옵션의 사용 여부를 나타내는 값을 가져옵니다.

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

구문

‘선언
Public ReadOnly Property Compatibility As Document_CompatibilityType
    Get
public Document_CompatibilityType Compatibility { get; }

속성 값

형식: Microsoft.Office.Tools.Word.Document_CompatibilityType

설명

Compatibility 속성은 다음 매개 변수와 함께 사용할 수 있습니다.

Parameter

설명

Type

검사할 호환성 옵션을 지정하는 WdCompatibility 값 중 하나입니다.

매개 변수를 지정하지 않고 Compatibility() 속성을 사용하면 사용자 코드에서 직접 사용하기 위한 Document_CompatibilityType 개체를 반환합니다.

호환성 옵션은 Microsoft Office Word에 문서가 표시되는 방식에 영향을 줍니다. WdCompatibility 값 중 일부는 지원되는 언어에 따라 사용하지 못할 수도 있습니다. 미국 영어)에 따라서는 이 인수 중 일부를 사용하지 못할 수도 있습니다.

예제

다음 코드 예제에서는 단락이 페이지 구분선 뒤에 있는 경우 단락 앞의 공백을 제거합니다. 이 예제를 사용하려면 문서 수준 프로젝트 ThisDocument 클래스에서 실행하십시오.

Private Sub DocumentCompatibility()
    Me.Compatibility(Word.WdCompatibility.wdSuppressSpBfAfterPgBrk) = True
End Sub
private void DocumentCompatibility()
{
    this.Compatibility[Word.WdCompatibility.wdSuppressSpBfAfterPgBrk] = true;
}

.NET Framework 보안

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

참고 항목

참조

DocumentBase 클래스

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