Finding appointment item of a contacts birthday without searching

  • Thread starter Thread starter Peter Marchert
  • Start date Start date
P

Peter Marchert

Hello experts,

is there a possibility to find a calendar item of a contact`s birthday
without searching by name or birthday?

I hope there is a way with mapitables?

Searching is to slow and complicate e. g. the user change the name of
the contact or the birthday. Looping through all appointments and
checking the link property is slow too.

How does Outlook handle this? May be there is a field in the contact
with the entryid of the calendar item?

Any help is welcome.

Peter
 
Thank you Michael.

May be my post was confusing, so here some more informations.

An user has 1000 or more birthdays in his contacts and also in the
calender. Now he change 1 contact information (e. g. the name). OL
2003 now creates a new calendar item. My code should find the old one,
delete it and after that (or before) change the new one.

In this case I could set a filter to the birthday and will find the
items in short time. But if he change the birthday...? Only the name
is to less and looping through all items to slow.

Hmm, may be I can set a filter to the modification time? Will this
work reliably? The code runs immediately after the contact is saved.

Thanks
Peter
 
PR_SEARCH_KEY in the contact is mirrored by the last 16 bytes of
ContactLinkSearchKey
(http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/85840102)
in the birthday appointment item, but I'm not sure how much help that is to
you.

Probably more helpful is the Links collection (Contacts) of the birthday
item leads you back to the contact item, but that's sort of the reverse of
what you're looking for.




Thank you Michael.

May be my post was confusing, so here some more informations.

An user has 1000 or more birthdays in his contacts and also in the
calender. Now he change 1 contact information (e. g. the name). OL
2003 now creates a new calendar item. My code should find the old one,
delete it and after that (or before) change the new one.

In this case I could set a filter to the birthday and will find the
items in short time. But if he change the birthday...? Only the name
is to less and looping through all items to slow.

Hmm, may be I can set a filter to the modification time? Will this
work reliably? The code runs immediately after the contact is saved.

Thanks
Peter
 
Thanks for your reply, Ken.

This sounds good but I do not find any information about
"ContactLinkSearchKey".

Is this a undocumented field? And is it aviable in Outlook 2000-2007?

Peter
 
I've never seen it documented. I found it using OutlookSpy. It's there in
Outlook 2003 on an Exchange setup but I don't see it on Outlook 2007 using a
different mailbox on the same Exchange server. So I guess that's one you
can't rely on.
 
Ok, thank you very much.

Peter

I've never seen it documented. I found it using OutlookSpy. It's there in
Outlook 2003 on an Exchange setup but I don't see it on Outlook 2007 using a
different mailbox on the same Exchange server. So I guess that's one you
can't rely on.











- Zitierten Text anzeigen -
 
Ok, that's a problem.

As a user can only edit one contact at a time, either Selection(1) or
ActiveInspector, you should be able to store that contact's data. If you
then receive an event that indicates that the birthday has changed then you
still know the old birthday and can act on that.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize eMails:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Mon, 24 Sep 2007 23:45:23 -0700 schrieb Peter Marchert:
 
Sorry, I didn`t saw your post before, Michael.

Yes, I did it similar as you described. On the selection change event
I get the contact as a private object and on the write event I adapt
the calendar.

Thanks
Peter

Ok, that's a problem.

As a user can only edit one contact at a time, either Selection(1) or
ActiveInspector, you should be able to store that contact's data. If you
then receive an event that indicates that the birthday has changed then you
still know the old birthday and can act on that.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize eMails:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Mon, 24 Sep 2007 23:45:23 -0700 schrieb Peter Marchert:




Thank you Michael.
May be my post was confusing, so here some more informations.
An user has 1000 or more birthdays in his contacts and also in the
calender. Now he change 1 contact information (e. g. the name). OL
2003 now creates a new calendar item. My code should find the old one,
delete it and after that (or before) change the new one.
In this case I could set a filter to the birthday and will find the
items in short time. But if he change the birthday...? Only the name
is to less and looping through all items to slow.
Hmm, may be I can set a filter to the modification time? Will this
work reliably? The code runs immediately after the contact is saved.
Thanks
Peter

Peter, this sample tells you the appointments of a given
day:http://www.vboffice.net/sample.html?mnu=2&lang=en&smp=13&cmd=showitem...
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>




Am Mon, 24 Sep 2007 11:02:04 -0700 schrieb Peter Marchert:
Hello experts,
is there a possibility to find a calendar item of a contact`s birthday
without searching by name or birthday?
I hope there is a way with mapitables?
Searching is to slow and complicate e. g. the user change the name of
the contact or the birthday. Looping through all appointments and
checking the link property is slow too.
How does Outlook handle this? May be there is a field in the contact
with the entryid of the calendar item?
Any help is welcome.
Peter
--
Infos, workshops & soft-
ware for your Outlook®:
www.outlook-stuff.com-Zitierten Text ausblenden -
- Zitierten Text anzeigen -- Zitierten Text ausblenden -

- Zitierten Text anzeigen -- Zitierten Text ausblenden -

- Zitierten Text anzeigen -
 
Back
Top