|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Capture appointment changeI 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 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. -- Show quoteHide quoteKen 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 > 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 >> > 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 -- Show quoteHide quoteKen 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: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
Other interesting topics
Forward mail without using the default signature
Create Macro to move email to subfolder in inbox Start macro creating a mail with contact data and autotext Delegate Exporting Contacts using VBA? Copy message body with formatting from Outlook to Word. Inspector.WordEditor always returns null Printing TIFF/JPG Attachment Importing from Excel with HTML Formatting Redemption Error code 13 while opening addressbook - vbscript Walking the Inbox |
|||||||||||||||||||||||