Home All Groups Group Topic Archive Search About
Author
15 May 2009 6:30 PM
Kevin Vogler
I have multiple calendar folders. I need to detect when an appointment is
moved from one folder to another. I only need to find the source folder and
the destination folder.

Is there a way to determine this from the property change event if I don't
know in advance which appointment is going to be moved and which folder it's
in?

Many thanks in advance,

Kevin Vogler
Author
18 May 2009 1:49 PM
Ken Slovak - [MVP - Outlook]
The PropertyChange event is only useful when you have a specific item or
items you are monitroring and have subscribed to that event on that item or
items. That can be done, but when an item is moved it's essentially copied
and then deleted, so that event won't really help you.

What normally would be done would be to handle the ItemAdd() and
ItemRemove() eventson all calendar folders Items collection. You would
recursively scan all folders to find all calendar folders and when found
assign a folder object and Items collection for each one, then you'd set up
event handlers for ItemAdd() and ItemRemove() for each of those folders.

Those events will tell you what you want to know.

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


Show quoteHide quote
"Kevin Vogler" <kvog***@turnkeytec.com> wrote in message
news:ugrhzsY1JHA.4880@TK2MSFTNGP03.phx.gbl...
>I have multiple calendar folders. I need to detect when an appointment is
>moved from one folder to another. I only need to find the source folder and
>the destination folder.
>
> Is there a way to determine this from the property change event if I don't
> know in advance which appointment is going to be moved and which folder
> it's in?
>
> Many thanks in advance,
>
> Kevin Vogler
>
Are all your drivers up to date? click for free checkup

Author
18 May 2009 3:31 PM
Kevin Vogler
Ken,

Thanks for the response.

I'm new to this. Could you point me at an example of how to programtically
add the handlers?

Thanks for your help

Kevin Vogler
Show quoteHide quote
"Ken Slovak - [MVP - Outlook]" <kenslo***@mvps.org> wrote in message
news:OgesAD81JHA.1864@TK2MSFTNGP02.phx.gbl...
> The PropertyChange event is only useful when you have a specific item or
> items you are monitroring and have subscribed to that event on that item
> or items. That can be done, but when an item is moved it's essentially
> copied and then deleted, so that event won't really help you.
>
> What normally would be done would be to handle the ItemAdd() and
> ItemRemove() eventson all calendar folders Items collection. You would
> recursively scan all folders to find all calendar folders and when found
> assign a folder object and Items collection for each one, then you'd set
> up event handlers for ItemAdd() and ItemRemove() for each of those
> folders.
>
> Those events will tell you what you want to know.
>
> --
> 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
>
>
> "Kevin Vogler" <kvog***@turnkeytec.com> wrote in message
> news:ugrhzsY1JHA.4880@TK2MSFTNGP03.phx.gbl...
>>I have multiple calendar folders. I need to detect when an appointment is
>>moved from one folder to another. I only need to find the source folder
>>and the destination folder.
>>
>> Is there a way to determine this from the property change event if I
>> don't know in advance which appointment is going to be moved and which
>> folder it's in?
>>
>> Many thanks in advance,
>>
>> Kevin Vogler
>>
>
Author
19 May 2009 12:39 PM
Ken Slovak - [MVP - Outlook]
Sure. Search at www.outlookcode.com for "ItemAdd" or "ItemRemove" and
there's lots of sample code there in various languages that show how to set
up those event handlers. For example,
http://www.outlookcode.com/codedetail.aspx?id=456 shows VBA type ItemAdd
code.

This examples shows how to get at various folders, there are many others
like this: http://www.outlookcode.com/d/code/getfolder.htm

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


Show quoteHide quote
"Kevin Vogler" <kvog***@turnkeytec.com> wrote in message
news:eSdcC381JHA.1644@TK2MSFTNGP02.phx.gbl...
> Ken,
>
> Thanks for the response.
>
> I'm new to this. Could you point me at an example of how to programtically
> add the handlers?
>
> Thanks for your help
>
> Kevin Vogler

Bookmark and Share