2010-04-30 44 views
1

我在做類似這樣的東西,但不知道是否有一個事件的地方,我失蹤在使用VSTO 3.0的Outlook 2007中,如何檢測自Outlook啓動以來默認存儲是否已更改?

Store DefaultStore 
    { 
     get 
     { 
      var defaultStore = mOutlookApp_Model.Session.DefaultStore; 

      if (defaultStore.StoreID == mDefaultStore.StoreID) 
      { 
       // the default store we set at startup is the same as the default store now, so all good 
       return mDefaultStore; 
      } 
      else 
      { 
       // the user changed the default store, so restart the addin_app 
       DefaultStoreChangedRestartAddIn.Fire(); 
       return null; 
      } 
     } 
    } 
    readonly Store mDefaultStore; 

回答

1

都能跟得上沒有在API中這樣的事,所以手各具特色的東西是唯一的辦法。

相關問題