Problem while converting GAL entries to contacts in Outlook Cont

  • Thread starter converting GAL entries to contacts
  • Start date
C

converting GAL entries to contacts

Hi,

I am retrieving the GAL contcts of outlook using the following code snippet
and converting them into contacts to retrieve the email address of that
particular GAL entry.
Here I am using Outlook 2007 dll.

OutLook.

Application app = new Microsoft.Office.Interop.Outlook. Application ();



AddressEntries addressEntries = app.Session.AddressLists[ "Global Address
List" ].AddressEntries;



for ( int a = 1; a <= addressEntries.Count; a++)

{

OutLook.

ContactItem contact = ( ContactItem )addressEntries[a].GetContact();



string email = contact.Email1Address;

}

when I try to convert each address entry of Global Address List(GAL) into a
contact, it is not converting EmailAddreess value of that GAL entry ,instead
it is converting to a null value eventhough email address exists for that GAL
entry.

How to get email address property value when converting a GAL entry into a
contact?
Here I am using outlook 2007 Object Model dll.

So, anyone please help me how can I solve the above requirement through the
sample code snippet.
 
C

converting GAL entries to contacts

Hi,

Thanks for the Reply.
I have another doubt.

How can I filter the Global Address List contacts based on my requiremnts?
OutLook.AddressEntries class does not contain a methos like Restrict or Find.
So, How can I filter the Global Address List contacts based on my name?





Sue Mosher said:
Try using GetExchangeUser instead of GetContact.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"converting GAL entries to contacts"
Hi,

I am retrieving the GAL contcts of outlook using the following code
snippet
and converting them into contacts to retrieve the email address of that
particular GAL entry.
Here I am using Outlook 2007 dll.

OutLook.

Application app = new Microsoft.Office.Interop.Outlook. Application ();



AddressEntries addressEntries = app.Session.AddressLists[ "Global Address
List" ].AddressEntries;



for ( int a = 1; a <= addressEntries.Count; a++)

{

OutLook.

ContactItem contact = ( ContactItem )addressEntries[a].GetContact();



string email = contact.Email1Address;

}

when I try to convert each address entry of Global Address List(GAL) into
a
contact, it is not converting EmailAddreess value of that GAL entry
,instead
it is converting to a null value eventhough email address exists for that
GAL
entry.

How to get email address property value when converting a GAL entry into a
contact?
Here I am using outlook 2007 Object Model dll.

So, anyone please help me how can I solve the above requirement through
the
sample code snippet.
 
C

converting GAL entries to contacts

How can I filter or Restrict the GAL contacts based on name or
MobileTelephoneNumber or companyName.?

I think Outlook.AddressEntries class does not contain a methods like Find()
or Restrict() to restrict the contacts based on our query.

How can I acheve the above requirement?


Sue Mosher said:
Try using GetExchangeUser instead of GetContact.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"converting GAL entries to contacts"
Hi,

I am retrieving the GAL contcts of outlook using the following code
snippet
and converting them into contacts to retrieve the email address of that
particular GAL entry.
Here I am using Outlook 2007 dll.

OutLook.

Application app = new Microsoft.Office.Interop.Outlook. Application ();



AddressEntries addressEntries = app.Session.AddressLists[ "Global Address
List" ].AddressEntries;



for ( int a = 1; a <= addressEntries.Count; a++)

{

OutLook.

ContactItem contact = ( ContactItem )addressEntries[a].GetContact();



string email = contact.Email1Address;

}

when I try to convert each address entry of Global Address List(GAL) into
a
contact, it is not converting EmailAddreess value of that GAL entry
,instead
it is converting to a null value eventhough email address exists for that
GAL
entry.

How to get email address property value when converting a GAL entry into a
contact?
Here I am using outlook 2007 Object Model dll.

So, anyone please help me how can I solve the above requirement through
the
sample code snippet.
 
S

Sue Mosher [MVP]

What requirements?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"converting GAL entries to contacts"
Hi,

Thanks for the Reply.
I have another doubt.

How can I filter the Global Address List contacts based on my requiremnts?
OutLook.AddressEntries class does not contain a methos like Restrict or
Find.
So, How can I filter the Global Address List contacts based on my name?

Sue Mosher said:
Try using GetExchangeUser instead of GetContact.

"converting GAL entries to contacts"
message
Hi,

I am retrieving the GAL contcts of outlook using the following code
snippet
and converting them into contacts to retrieve the email address of that
particular GAL entry.
Here I am using Outlook 2007 dll.

OutLook.

Application app = new Microsoft.Office.Interop.Outlook. Application ();



AddressEntries addressEntries = app.Session.AddressLists[ "Global
Address
List" ].AddressEntries;



for ( int a = 1; a <= addressEntries.Count; a++)

{

OutLook.

ContactItem contact = ( ContactItem )addressEntries[a].GetContact();



string email = contact.Email1Address;

}

when I try to convert each address entry of Global Address List(GAL)
into
a
contact, it is not converting EmailAddreess value of that GAL entry
,instead
it is converting to a null value eventhough email address exists for
that
GAL
entry.

How to get email address property value when converting a GAL entry
into a
contact?
Here I am using outlook 2007 Object Model dll.

So, anyone please help me how can I solve the above requirement through
the
sample code snippet.
 
D

Dmitry Streblechenko

Most address book providers (GAL being the only semi-functioning example) do
not implement the search functionality.
You can try Redemption to do that (RDOAddressEntry.MAPITable will let you
perform restrictions), but your mileage will vary depending on the address
book provider and the compexity of the restriction.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"converting GAL entries to contacts"
How can I filter or Restrict the GAL contacts based on name or
MobileTelephoneNumber or companyName.?

I think Outlook.AddressEntries class does not contain a methods like
Find()
or Restrict() to restrict the contacts based on our query.

How can I acheve the above requirement?


Sue Mosher said:
Try using GetExchangeUser instead of GetContact.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"converting GAL entries to contacts"
message
Hi,

I am retrieving the GAL contcts of outlook using the following code
snippet
and converting them into contacts to retrieve the email address of that
particular GAL entry.
Here I am using Outlook 2007 dll.

OutLook.

Application app = new Microsoft.Office.Interop.Outlook. Application ();



AddressEntries addressEntries = app.Session.AddressLists[ "Global
Address
List" ].AddressEntries;



for ( int a = 1; a <= addressEntries.Count; a++)

{

OutLook.

ContactItem contact = ( ContactItem )addressEntries[a].GetContact();



string email = contact.Email1Address;

}

when I try to convert each address entry of Global Address List(GAL)
into
a
contact, it is not converting EmailAddreess value of that GAL entry
,instead
it is converting to a null value eventhough email address exists for
that
GAL
entry.

How to get email address property value when converting a GAL entry
into a
contact?
Here I am using outlook 2007 Object Model dll.

So, anyone please help me how can I solve the above requirement through
the
sample code snippet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top