For anyone interested, I figured out a way to do it by making my application extension implement ICustomizationFilter. Here is the OnCustomizationEvent method I use:public Boolean OnCustomizationEvent(esriCustomizationEvent e, Object context)
{
if (e == esriCustomizationEvent.esriCEInvokeCommand && context is ICommandItem)
m_currentCommandId = ((ICommandItem)context).ID;
// Always return false - we don't want the UI locked.
// Just need to know the last command triggered
return false;
}
Then in the OnSave method I can check to see if the m_currentCommandId UID is {119591DB-0255-11D2-8D20-080009EE4E51} and the sub-type is 3 which is the ID and sub-type for 'Save...'. The full list of UID values and sub-types can be found here.