Document.Object Method
Returns an interface or object that can be accessed at run time by name.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
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
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.
Examples
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 Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.