Have macro identify selected folder in Solution Explorer RRS feed

  • Question

  • I want to select a folder in solution explorer, right click on it and select a command that will run a macro.  this macro will process sub items in this folder.  How can the macro know which folder this is?



    Friday, April 20, 2012 4:24 AM

All replies

  • Hi Moondaddy,

    You can get the reference of current selected object via  DTE.SelectedItems.Item(1)



    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us

    Monday, April 23, 2012 5:38 AM
  • OK Thanks - That helped.  Now I need to get the project name and path which the selected item belongs to. 

    I've browsed all the available properties in the watch window and dont see a way to do this.

    Do you know how to do this?


    Thursday, April 26, 2012 4:20 AM