The SelectedItem object represents a selected project or project item.
The SelectedItems collection returns a collection of all SelectedItem objects.
Remarks
The SelectedItem object allows you to get the project with the focus in order to provide context for an add-in.
A project always has a SelectedItems collection, even when there are no project items selected. For example, if the Project Explorer has focus and a project node is selected, there is one SelectedItem object. That selected itemÆs Project property points to the selected project, and the ProjectItem property is Null.
When the alternate directory view is up, and a file is selected that is not a project item, the SelectedItem.Info field provides the full pathname to the selected file. The project and projectitem properties are set to Null.