Share via


DTE Interface

Definition

The top-level object in the Visual Studio automation object model. The documentation for the _DTE type is the most complete.

public interface class DTE : EnvDTE::_DTE
Derived
Attributes
Implements

Examples

Sub DTEExample()  
    Dim objTextDoc As TextDocument  
    Dim objEP As EditPoint  

    ' Create a new text document.  
    DTE.ItemOperations.NewFile("General\Text File")  
    ' Get a handle to the new document.  
    Set objTextDoc = DTE.ActiveDocument.Object("TextDocument")  
    Set objEP = objTextDoc.StartPoint.CreateEditPoint  
    ' Create an EditPoint and add some text.  
    objEP.Insert "A test sentence."  
End Sub  

Remarks

For details about referencing the EnvDTE namespace and the DTE object, see FAQ: Converting Add-ins to VSPackage Extensions.

Properties

Methods

Applies to