![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I am trying to use the ItemChange event on Contacts.Items to execute VBA code that will propagate the change to a contacts folder in my local PST file. My question is two-part: 1. When I delete a contactitem from the contacts folder, the ItemChange event fires and copies the deleted item to my PST file. How can I distinguish the difference between changing an item or deleting an item using VBA? If I also add code for the ItemRemove Event, will both events still fire? 2. When I manually copy a contactitem from one folder to another it asks if I want to update with changes or copy as a new item? When I propagate a changed item using VBA, it adds the changed item as a new item rather than merging the changed item with the existing item and doesn't give me an option? Is there something I can do differently? Sub ContactsFolder_ItemChange(ByVal Item As Object) If InStr(Item.Categories, "Keyword") 0 Then Dim Destination_Folder As MAPIFolder Set Destination_Folder = GetFolder("Mailbox - Keyword\Contacts") Set ContactItemCopy = Item.Copy ContactItemCopy.Move Destination_Folder Else Set Destination_Folder = GetFolder("Mailbox - Local\Contacts") Set ContactItemCopy = Item.Copy ContactItemCopy.Move Destination_Folder End If End Sub Thanks, Collings |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ItemRemove event stop firing, ItemAdd & ItemChange still work | Jason | Add-ins for Outlook | 3 | March 4th 09 11:24 PM |
itemchange event in public (exchange) folder occurs if nothing is changed | MIchael | Outlook and VBA | 7 | May 23rd 07 11:04 PM |
ItemChange event is modifying my Calendar Events | mark | Add-ins for Outlook | 4 | November 6th 06 10:17 PM |
Propagate the same user for multiple folders in Outlook | FPerkins | Outlook - General Queries | 1 | June 29th 06 04:08 PM |
Mapi Folder Items ItemChange event is not firing | AtulSureka | Outlook and VBA | 3 | February 5th 06 06:25 PM |