Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   How to read all contacts with the same name. (http://www.outlookbanter.com/add-ins-outlook/82905-how-read-all-contacts-same.html)

Sergeichik December 9th 08 10:37 AM

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.

Dmitry Streblechenko December 10th 08 02:28 AM

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.




Sergeichik December 10th 08 09:19 AM

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 ?

Sergeichik December 10th 08 09:31 AM

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?

Sergeichik December 10th 08 09:40 AM

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 ?

Dmitry Streblechenko December 11th 08 05:09 PM

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 ?




Dmitry Streblechenko December 11th 08 05:09 PM

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?




Sergeichik December 15th 08 12:08 PM

How to read all contacts with the same name.
 
"Dmitry Streblechenko" wrote:

Thank you, it will be useful.




All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com