Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: How to read all contacts with the same name.

Geek News

How to read all contacts with the same name.
Sergeichik 12/9/2008 10:37:00 AM
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.
Re: How to read all contacts with the same name.
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 12/10/2008 2:28:19 AM
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" <Sergeichik[ at ]discussions.microsoft.com> wrote in message
news:3E92DE1B-8DAA-4973-B92D-F1309747723F[ at ]microsoft.com...
[Quoted Text]
> 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.


Re: How to read all contacts with the same name.
Sergeichik 12/10/2008 9:19:01 AM
"Dmitry Streblechenko" wrote:

[Quoted Text]
> 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 ?
Re: How to read all contacts with the same name.
Sergeichik 12/10/2008 9:31:01 AM
"Dmitry Streblechenko" wrote:

[Quoted Text]
> 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?
Re: How to read all contacts with the same name.
Sergeichik 12/10/2008 9:40:03 AM
"Dmitry Streblechenko" wrote:

[Quoted Text]
> 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 ?
Re: How to read all contacts with the same name.
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 12/11/2008 5:09:05 PM
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:=[ at ]Prop;
Prop.ulPropTag:=PR_ANR;
Prop.Value.lpszA:=PChar(strName);
res:=HrQueryAllRows(Tbl, [ at ]GALColumns, [ at ]Restr, nil, 0, pRows);


--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Sergeichik" <Sergeichik[ at ]discussions.microsoft.com> wrote in message
news:AC21AF1D-C73E-4BED-8D24-077ABADE6AD2[ at ]microsoft.com...
[Quoted Text]
> "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 ?


Re: How to read all contacts with the same name.
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 12/11/2008 5:09:57 PM
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" <Sergeichik[ at ]discussions.microsoft.com> wrote in message
news:8D2C720C-B3E1-4D41-A699-59DDA96FEE98[ at ]microsoft.com...
[Quoted Text]
> "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?


Re: How to read all contacts with the same name.
Sergeichik 12/15/2008 12:08:01 PM
[Quoted Text]
> "Dmitry Streblechenko" wrote:

Thank you, it will be useful.


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net