如何将Outlook.AddressEntry对象的DL邮件地址分配给GetExchangeDistributionListMembers?

时间:2014-02-27 07:26:18

标签: c# asp.net outlook outlook-2010

我的网络应用程序中要求所有人都向特定DL成员显示特定页面。

请帮我解决下面的代码,我无法分配dl mail addesser。

private void GetDistributionListMembers()
        {            
            string test = "test@mail.com";            

                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 个答案:

答案 0 :(得分:1)

调用Namespace.ResolveName,(返回Recipient对象),调用Recipient.Resolve,使用Recipient.AddressEntry属性。