I was trying to get properties of a Macro project and I came up with the following. Please remember that the code below comes with a Disclaimer
Hope it helps
Tufan
Sub GetMacroPrjProperties()
Dim projectPath As String = "Macros\MyMacros" 'Get the Macro Explorer window and activate itDim macrosWin As Window = DTE.Windows.Item(Constants.vsWindowKindMacroExplorer) macrosWin.Activate() 'Get the UIHierarchy for Macro ExplorerDim macroExpl As UIHierarchy = macrosWin.Object Dim macroProjectHierarchy As UIHierarchyItem = macroExpl.GetItem(projectPath) 'Get the Properties window and activate it Dim propWin As EnvDTE.Window = DTE.Windows.Item(Constants.vsWindowKindProperties)propWin.Activate() 'Select the Macro Project which will also set the SelectionContainer for Properties windowmacroProjectHierarchy.Select(vsUISelectionType.vsUISelectionTypeSelect) 'DTE.SelectedItems.SelectionContainer.Item(1) should get you a VSMacroHierarchyLib.IProjectPropsDebug.Print(DTE.SelectedItems.SelectionContainer.Item(1).Name)Debug.Print(DTE.SelectedItems.SelectionContainer.Item(1).StorageFormat)
End Sub