2014-02-27 26 views
0

我在我的web應用程序中要求所有人都向特定DL成員顯示特定頁面。如何將DL郵件地址分配給Outlook.AddressEntry對象到GetExchangeDistributionListMembers?

請在下面的代碼中幫助我,我不能指定dl郵件addesser。

private void GetDistributionListMembers() 
     {    
      string test = "[email protected]";    

       Outlook.AddressEntry addrEntry == ??? 


        Outlook.ExchangeDistributionList exchDL = addrEntry.GetExchangeDistributionList(); 
        Outlook.AddressEntries addrEntries = exchDL.GetExchangeDistributionListMembers(); 
        if (addrEntries != null) 
         foreach (Outlook.AddressEntry exchDLMember 
          in addrEntries) 
         { 
          //Debug.WriteLine(exchDLMember.Name); 
         }     
      } 
     } 

回答

1

調用Namespace.ResolveName(返回Recipient對象),調用Recipient.Resolve,使用Recipient.AddressEntry屬性。

+0

謝謝我已經使用這種技術來滿足這個需求... http://stackoverflow.com/questions/7168361/determine-if-user-is-in-ad-group-for-net-4-0-application –

相關問題