다음을 통해 공유


Document.Object 메서드

런타임에 이름으로 액세스할 수 있는 인터페이스 또는 개체를 반환합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Function Object ( _
    ModelKind As String _
) As Object
Object Object(
    string ModelKind
)
Object^ Object(
    [InAttribute] String^ ModelKind
)
abstract Object : 
        ModelKind:string -> Object
function Object(
    ModelKind : String
) : Object

매개 변수

  • ModelKind
    형식: String

    선택 사항 데이터 모델 형식입니다. 사용하는 유일한 값은 "TextDocument" 및 "Document"입니다.

반환 값

형식: Object
개체입니다.

예제

Public Sub AddText()
    Dim doc As Document = ActiveDocument
    If Not doc Is Nothing Then
        Dim textDoc As TextDocument = doc.Object("TextDocument")
        If Not textDoc Is Nothing Then
            textDoc.CreateEditPoint().Insert("MyText")
        End If
    End If
End Sub

.NET Framework 보안

참고 항목

참조

Document 인터페이스

EnvDTE 네임스페이스