Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Finding appointment item of a contacts birthday without searching (http://www.outlookbanter.com/outlook-vba/57502-finding-appointment-item-contacts-birthday.html)

Peter Marchert September 24th 07 07:02 PM

Finding appointment item of a contacts birthday without searching
 
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


Michael Bauer [MVP - Outlook] September 25th 07 06:09 AM

Finding appointment item of a contacts birthday without searching
 


Peter, this sample tells you the appointments of a given day:
http://www.vboffice.net/sample.html?...owitem&pub= 6

--
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 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


Peter Marchert September 25th 07 07:45 AM

Finding appointment item of a contacts birthday without searching
 
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

On 25 Sep., 07:09, "Michael Bauer [MVP - Outlook]"
wrote:
Peter, this sample tells you the appointments of a given day:http://www.vboffice.net/sample.html?...3&cmd=showitem...

--
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 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 -




Ken Slovak - [MVP - Outlook] September 25th 07 03:04 PM

Finding appointment item of a contacts birthday without searching
 
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Peter Marchert" wrote in message
ups.com...
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 Marchert September 25th 07 06:14 PM

Finding appointment item of a contacts birthday without searching
 
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

On 25 Sep., 16:04, "Ken Slovak - [MVP - Outlook]"
wrote:
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.

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm

"Peter Marchert" wrote in message

ups.com...
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




Ken Slovak - [MVP - Outlook] September 25th 07 06:30 PM

Finding appointment item of a contacts birthday without searching
 
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Peter Marchert" wrote in message
oups.com...
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



Peter Marchert September 25th 07 07:04 PM

Finding appointment item of a contacts birthday without searching
 
Ok, thank you very much.

Peter

On 25 Sep., 19:30, "Ken Slovak - [MVP - Outlook]"
wrote:
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.

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm

"Peter Marchert" wrote in message

oups.com...



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- Zitierten Text ausblenden -


- Zitierten Text anzeigen -




Michael Bauer [MVP - Outlook] September 28th 07 07:37 AM

Finding appointment item of a contacts birthday without searching
 


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

On 25 Sep., 07:09, "Michael Bauer [MVP - Outlook]"
wrote:
Peter, this sample tells you the appointments of a given

day:http://www.vboffice.net/sample.html?...3&cmd=showitem...

--
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 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 -


Peter Marchert October 1st 07 04:11 PM

Finding appointment item of a contacts birthday without searching
 
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

On 28 Sep., 08:37, "Michael Bauer [MVP - Outlook]"
wrote:
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


On 25 Sep., 07:09, "Michael Bauer [MVP - Outlook]"
wrote:
Peter, this sample tells you the appointments of a given


day:http://www.vboffice.net/sample.html?...3&cmd=showitem...

--
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 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 -





All times are GMT +1. The time now is 11:14 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