Document::Object Method (String^)

 

Returns an interface or object that can be accessed at run time by name.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Object^ Object(
	String^ ModelKind = ""
)

Parameters

ModelKind
Type: System::String^

Optional. The type of data model. The only values used are "TextDocument" and "Document".

Return Value

Type: System::Object^

An 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
Return to top
Show: