Export (0) Print
Expand All

Projects Collection

Visual Studio .NET 2003

Represents all of the projects of a given kind.

DTE Object


[Visual Basic .NET]
Public Interface Projects
    Inherits IDispatch
[Visual Basic 6]
Class Projects
interface Projects : IDispatch
public interface Projects : IDispatch
[JScript .NET]
public interface Projects extends IDispatch


The Projects collection represents all projects of the same kind in the current instance of the IDE. Typically, this collection is late-bound to the DTE object.


Namespace: EnvDTE

File: dte.tlb


This example lists the name of the first macro that displays in Macro Explorer.

Sub ProjectsExample()
   Dim prjVSProject As VSLangProj.VSProject
   prjVSProject = DTE.MacrosIDE.Solution.Projects.Item(1).Object
   MsgBox("First macro project: " & prjVSProject.Project.Name)
End Sub

See Also

Project Object | ProjectItem Object | ProjectItems Collection

Properties, Methods, and Events

© 2015 Microsoft