A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to read all contacts with the same name.



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 9th 08, 10:37 AM posted to microsoft.public.outlook.program_addins
Sergeichik
external usenet poster
 
Posts: 21
Default How to read all contacts with the same name.

How to read all contacts from Outlook Address book with some particular name,
for example 'Sunny', (from all folders) programmatically.
Can I do it with ResolveName() function ? It stops at the first founded
contact.
Ads
  #2  
Old December 10th 08, 02:28 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to read all contacts with the same name.

As I mentioned in my prrevious reply, perform PR_ANR restriction on all
address book containers that you want to process.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Sergeichik" wrote in message
...
How to read all contacts from Outlook Address book with some particular
name,
for example 'Sunny', (from all folders) programmatically.
Can I do it with ResolveName() function ? It stops at the first founded
contact.



  #3  
Old December 10th 08, 09:19 AM posted to microsoft.public.outlook.program_addins
Sergeichik
external usenet poster
 
Posts: 21
Default How to read all contacts with the same name.

"Dmitry Streblechenko" wrote:

As I mentioned in my prrevious reply, perform PR_ANR restriction on all
address book containers that you want to process.



Can you give any example ?
  #4  
Old December 10th 08, 09:31 AM posted to microsoft.public.outlook.program_addins
Sergeichik
external usenet poster
 
Posts: 21
Default How to read all contacts with the same name.

"Dmitry Streblechenko" wrote:

As I mentioned in my prrevious reply, perform PR_ANR restriction on all
address book containers that you want to process.



Should I process containers in cycle and use ResolveName() for each of them?
  #5  
Old December 10th 08, 09:40 AM posted to microsoft.public.outlook.program_addins
Sergeichik
external usenet poster
 
Posts: 21
Default How to read all contacts with the same name.

"Dmitry Streblechenko" wrote:

As I mentioned in my prrevious reply, perform PR_ANR restriction on all
address book containers that you want to process.


May you give an example of such PR_ANR restriction ?
  #6  
Old December 11th 08, 05:09 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to read all contacts with the same name.

It is a regular RES_PROPERTY restriction:

Restr.rt:=RES_PROPERTY;
Restr.res.resProperty.relop:=RELOP_EQ;
Restr.res.resProperty.ulPropTag:=PR_ANR;
Restr.res.resProperty.lpProp:=@Prop;
Prop.ulPropTag:=PR_ANR;
Prop.Value.lpszA:=PChar(strName);
res:=HrQueryAllRows(Tbl, @GALColumns, @Restr, nil, 0, pRows);


--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Sergeichik" wrote in message
...
"Dmitry Streblechenko" wrote:

As I mentioned in my prrevious reply, perform PR_ANR restriction on all
address book containers that you want to process.


May you give an example of such PR_ANR restriction ?



  #7  
Old December 11th 08, 05:09 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default How to read all contacts with the same name.

Yes, do that in a loop. But ResolveName won't help you if you have multipe
entries with ambiguous names - use PR_ANR restriction.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Sergeichik" wrote in message
...
"Dmitry Streblechenko" wrote:

As I mentioned in my prrevious reply, perform PR_ANR restriction on all
address book containers that you want to process.



Should I process containers in cycle and use ResolveName() for each of
them?



  #8  
Old December 15th 08, 12:08 PM posted to microsoft.public.outlook.program_addins
Sergeichik
external usenet poster
 
Posts: 21
Default How to read all contacts with the same name.

"Dmitry Streblechenko" wrote:

Thank you, it will be useful.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read all contacts with the same name. Sergeichik Outlook - Using Contacts 0 December 9th 08 10:36 AM
Calendar can't read Contacts? flarosa Outlook - Using Contacts 1 January 31st 08 08:57 PM
contacts read only wilecoyote Outlook - Using Contacts 1 March 9th 07 10:43 AM
Cannot read Notes contacts by using Outlook wong Outlook - General Queries 0 December 1st 06 08:24 AM
export-import contacts read only bgitter Outlook - Using Contacts 5 May 31st 06 08:14 PM


All times are GMT +1. The time now is 08:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.