![]() |
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
|
|||
|
|||
![]()
I've added an event handler to trigger when a new appointment is added into
my calendar. This works. However, when a new appointment is viewed in a preview pane in an inbox folder, this event is also triggered as Outlook appears to move a 'tentative' appointment into the calendar before the user has accepted,tentative or declined. My question is, how can I distinguish the difference? ( Basically I only want to trap on the USERS action of accepting or tentative. Any help appreciated.. Thanks Neil My event handler looks like this.. Public WithEvents myOlItems As Outlook.Items Private Sub Application_Startup() Set objNS = Application.GetNamespace("MAPI") Set fld = objNS.PickFolder If Not fld Is Nothing Then Set myOlItems = fld.Items End If End Sub Private Sub myOlItems_ItemAdd(ByVal Item As Object) Dim incomingAppt As Outlook.AppointmentItem MsgBox "you just added an item" End Sub |
Ads |
#2
|
|||
|
|||
![]()
I think the easiest option would be to monitor the ItemChange event in an
Items collection retrieved from the Calendar folder and check the ResponseStatus property. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "kneel" wrote: I've added an event handler to trigger when a new appointment is added into my calendar. This works. However, when a new appointment is viewed in a preview pane in an inbox folder, this event is also triggered as Outlook appears to move a 'tentative' appointment into the calendar before the user has accepted,tentative or declined. My question is, how can I distinguish the difference? ( Basically I only want to trap on the USERS action of accepting or tentative. Any help appreciated.. Thanks Neil My event handler looks like this.. Public WithEvents myOlItems As Outlook.Items Private Sub Application_Startup() Set objNS = Application.GetNamespace("MAPI") Set fld = objNS.PickFolder If Not fld Is Nothing Then Set myOlItems = fld.Items End If End Sub Private Sub myOlItems_ItemAdd(ByVal Item As Object) Dim incomingAppt As Outlook.AppointmentItem MsgBox "you just added an item" End Sub |
#3
|
|||
|
|||
![]()
Perfect, this is the exact help I needed!! Thanks again!
"Eric Legault [MVP - Outlook]" wrote: I think the easiest option would be to monitor the ItemChange event in an Items collection retrieved from the Calendar folder and check the ResponseStatus property. -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
In Visual Basic, how do I access the Calendar Label color for appt | D2SRJ | Outlook and VBA | 1 | October 26th 06 01:11 AM |
MS Visual Basic error in Outlook | XP User | Outlook - General Queries | 3 | May 7th 06 01:45 PM |
Visual Basic and OE | [email protected] | Outlook Express | 1 | February 8th 06 02:35 PM |
Visual Basic Editor opens automatically | [email protected] | Outlook and VBA | 0 | February 6th 06 05:53 PM |
how do Visual Basic Application (VBA) commands work | Jason | Outlook and VBA | 2 | January 10th 06 10:50 AM |