D
Derek
I have developed an add in for outlook 2003 using
microsoft.office.interop.outlook
I would like to get all of the email addresses from the Global address list
and display them in a text box. I can get to the Global address list and i
can get the properties shown below however i dont see the email address any
where how do i get the email address from the address lisr entry ?
StringBuilder sb = new StringBuilder();
Microsoft.Office.Interop.Outlook.AddressLists adl =
applicationObject.Session.AddressLists;
MessageBox.Show("address lists :- " + adl.Count);
foreach (Microsoft.Office.Interop.Outlook.AddressList ad in
adl)
{
if (ad.Name.ToString().ToLower().Equals("global address
list"))
{
MessageBox.Show(ad.Name.ToString());
foreach
(Microsoft.Office.Interop.Outlook.AddressEntry addressListEntry in
ad.AddressEntries)
{
sb.Append(addressListEntry.Name); //*allStaff
string a = addressListEntry.Address; //"/o=The
Blomfield Group/ou=BLOMFIELDST/cn=Recipients/cn=Distributionlists/cn=All
Staff" string
string b = addressListEntry.ID; //
string c =
addressListEntry.Members.Count.ToString();
string d = addressListEntry.Name; //
string e = addressListEntry.Type; // EX
microsoft.office.interop.outlook
I would like to get all of the email addresses from the Global address list
and display them in a text box. I can get to the Global address list and i
can get the properties shown below however i dont see the email address any
where how do i get the email address from the address lisr entry ?
StringBuilder sb = new StringBuilder();
Microsoft.Office.Interop.Outlook.AddressLists adl =
applicationObject.Session.AddressLists;
MessageBox.Show("address lists :- " + adl.Count);
foreach (Microsoft.Office.Interop.Outlook.AddressList ad in
adl)
{
if (ad.Name.ToString().ToLower().Equals("global address
list"))
{
MessageBox.Show(ad.Name.ToString());
foreach
(Microsoft.Office.Interop.Outlook.AddressEntry addressListEntry in
ad.AddressEntries)
{
sb.Append(addressListEntry.Name); //*allStaff
string a = addressListEntry.Address; //"/o=The
Blomfield Group/ou=BLOMFIELDST/cn=Recipients/cn=Distributionlists/cn=All
Staff" string
string b = addressListEntry.ID; //
string c =
addressListEntry.Members.Count.ToString();
string d = addressListEntry.Name; //
string e = addressListEntry.Type; // EX