Document::Object Method (String^)
Visual Studio 2015
Returns an interface or object that can be accessed at run time by name.
Assembly: EnvDTE (in EnvDTE.dll)
Parameters
- ModelKind
-
Type:
System::String^
Optional. The type of data model. The only values used are "TextDocument" and "Document".
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
Show: