Problem while converting GAL entries to contacts in Outlook Cont

  • Thread starter converting GAL entries to contacts
  • Start date
Status
Not open for further replies.
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.
 
Try using GetExchangeUser instead of GetContact.

Sue Mosher

"converting GAL entries to contacts"

<convertingGALentriestocontacts> wrote in message

news:BE04F439-6C18-4383-B789-3DB3B173C359@microsoft.com...
> 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.
 
Re: Problem while converting GAL entries to contacts in Outlook C

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 [MVP]" wrote:


> Try using GetExchangeUser instead of GetContact.

> > Sue Mosher
> > >

> "converting GAL entries to contacts"
> <convertingGALentriestocontacts> wrote in message
> news:BE04F439-6C18-4383-B789-3DB3B173C359@microsoft.com...
> > 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.


>
 
Re: Problem while converting GAL entries to contacts in Outlook C

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 [MVP]" wrote:


> Try using GetExchangeUser instead of GetContact.

> > Sue Mosher
> > >

> "converting GAL entries to contacts"
> <convertingGALentriestocontacts> wrote in message
> news:BE04F439-6C18-4383-B789-3DB3B173C359@microsoft.com...
> > 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.


>
 
Re: Problem while converting GAL entries to contacts in Outlook C

What requirements?

Sue Mosher

"converting GAL entries to contacts"

<convertingGALentriestocontacts> wrote in message

news:16543D50-7311-43D9-9E46-8F540BE0A87F@microsoft.com...
> 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 [MVP]" wrote:
>
> > Try using GetExchangeUser instead of GetContact.



>

>> "converting GAL entries to contacts"
> > <convertingGALentriestocontacts> wrote in
> > message
> > news:BE04F439-6C18-4383-B789-3DB3B173C359@microsoft.com...
> > > 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.

>

>
>>
 
Re: Problem while converting GAL entries to contacts in Outlook C

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)

-

"converting GAL entries to contacts"

<convertingGALentriestocontacts> wrote in message

news:31224336-116D-47F3-AE05-C165536A789D@microsoft.com...

> 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 [MVP]" wrote:
>
> > Try using GetExchangeUser instead of GetContact.
>

>> > > Sue Mosher
> > >> >> >
>
>> "converting GAL entries to contacts"
> > <convertingGALentriestocontacts> wrote in
> > message
> > news:BE04F439-6C18-4383-B789-3DB3B173C359@microsoft.com...
> > > 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.

>

>
>>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P UserProperty of mail object problem while dealing with custom fold Outlook VBA and Custom Forms 2
Victor_50 Problem - Google Workspace will stop "unsafe" access to Outlook end 2024 Using Outlook 3
Geldner Problem submitting SPAM using Outlook VBA Form Outlook VBA and Custom Forms 2
A Online Mode to Cached Exchange Mode problem Using Outlook 2
S Problem Accessing .MSG Property 'ImageNaturalHeight' Tag '0x80010003' Outlook VBA and Custom Forms 1
T Problem when requesting to view an email in a browser Using Outlook 0
R Outlook 2021 Having problem setting up outlook 2021 with windows 11. I have 3 gmail accounts and I want the 3 gmail, emails to merge into the same outlook input. Using Outlook.com accounts in Outlook 0
e_a_g_l_e_p_i Is anyone else having problem conneccting to gmail? Using Outlook 27
P Outlook calendar and contacts sync problem-outlook disconnects Using Outlook.com accounts in Outlook 2
S Archiving and Likely Modified Date Problem Using Outlook 3
R Problem moving file “Email folders.pst” to new PC Using Outlook 5
S Problem Checking the available stores in my Inbox (Outlook VBA) Outlook VBA and Custom Forms 0
Witzker GetAssignedView Problem Outlook VBA and Custom Forms 2
M Outlook 2010 Problem with OutLook 2010 32 bit, after Windows Auto Update Using Outlook 3
Marc2019 Outlook 2016 Font Problem Using Outlook 5
X I have met my waterloo trying to resolve embedded graphics problem with outlook 2007 and now 2016 Using Outlook 1
D Problem with custom form including _DocSiteControl1 Outlook VBA and Custom Forms 0
S Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 4
S Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 0
D Sort Problem with Sent Folders Using Outlook 1
S Conditional formatting problem with "is not empty" and categories Using Outlook 2
Mark Foley The upload of "Calendar" failed. There was a problem with the request. Using Outlook 6
avant-guvnor Import csv problem Using Outlook 7
katehawkins Outlook 2013 Ost to pst conversion problem Using Outlook 1
AbbieWhite The problem with a fairly large file. Using Outlook 3
I Outlook 2013 Send problem - 'Not Responding' forever Using Outlook.com accounts in Outlook 10
EmelineGueguen Help to understand the problem of work Using Outlook 1
W Outlook 2016 search problem persists after applying all known solutions Using Outlook 12
S problem with convert Using Outlook 1
S SendFromAccount - Problem trying to test existing value in open email Outlook VBA and Custom Forms 2
DruinaBiscardi unexpected problem in outlook Using Outlook 1
V Outlook 2003 problem with Windows 10 Creators Update 1709 Using Outlook 0
G Windows Update Causes BCM Database Access Problem? BCM (Business Contact Manager) 4
Grimev66 problem with conversion ost to pst Using Outlook 2
R Problem with searching public folders Exchange 2013/16 Exchange Server Administration 2
J Problem with Outlook 2016 new mail tray icon alert (envelope in the systems tray) Using Outlook.com accounts in Outlook 0
S Problem running Command button code Outlook VBA and Custom Forms 2
A .ost file problem Using Outlook 4
G PROBLEM REGARDING OUTLOOK STORAGE LANGUAGES Using Outlook 4
PetraTech Odd Folder View Problem Using Outlook 3
V iCloud problem Using Outlook 9
D Reply Problem with Outlook.com account Using Outlook.com accounts in Outlook 0
MattC Problem with Outlook 2007 & iCloud / duplicate tasks Using Outlook 1
V Problem moving folders Using Outlook 4
C Problem tracking meeting responses Using Outlook 3
Mark Foley Problem subscribing to shared calendar Using Outlook 1
K Problem with FreeBusy (before 1pm only) Outlook VBA and Custom Forms 7
skylark53 Advanced recurrence problem Using Outlook 2
E RSS export as OPML problem Using Outlook 4
D outlook 2013 contact list problem Using Outlook 0

Similar threads

Back
Top