Metoda Document.Object —

Zwraca interfejsu lub obiektu, do którego ma dostęp w czasie wykonywania przez nazwę.

Przestrzeń nazw:  EnvDTE
Zestaw:  EnvDTE (w EnvDTE.dll)

Składnia

'Deklaracja
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

Parametry

  • ModelKind
    Typ: String

    Opcjonalne.Typ modelu danych.Tylko wartości używane są "TextDocument" i "Dokument".

Wartość zwracana

Typ: Object
Obiekt.

Przykłady

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

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

Document Interfejs

Przestrzeń nazw EnvDTE