Getting Macro project properties
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 it
Dim macrosWin As Window = DTE.Windows.Item(Constants.vsWindowKindMacroExplorer) macrosWin.Activate() 'Get the UIHierarchy for Macro Explorer
Dim 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 window
macroProjectHierarchy.Select(vsUISelectionType.vsUISelectionTypeSelect) 'DTE.SelectedItems.SelectionContainer.Item(1) should get you a VSMacroHierarchyLib.IProjectProps
Debug.Print(DTE.SelectedItems.SelectionContainer.Item(1).Name)
Debug.Print(DTE.SelectedItems.SelectionContainer.Item(1).StorageFormat)
End Sub