![]() |
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
|
|||
|
|||
![]()
My events for appointment items being added or changed aren't always
triggered when I add or change an appointment. Sometimes, after I start a session , they don't tirgger at all, and I have to restart (sometimes more than once) before they'll get triggered. And if I make VBA coding changes this seems to cause them not to be trigerred also. There must be somethiing I don't understand about Outlook's programming envrionment. I know the events aren't being triggered because I'll put break points on the very first statement in both events and they never get reached. Here is the code I have in ThisOutlookSession for my events (I checked in the code to see if my WithEvents variable is ever reset anywhere and it's not)... Public WithEvents m_colCalItems As Outlook.Items Public Sub m_colCalItems_ItemAdd(ByVal item As Object) If item.Class = olAppointment Then Call ApptAddedOrChanged(item) End If End Sub Public Sub m_colCalItems_ItemChange(ByVal item As Object) If item.Class = olAppointment Then Call ApptAddedOrChanged(item) End If End Sub Private Sub Application_Startup() Set m_colCalItems = Application.GetNamespace("MAPI").GetDefaultFolder( olFolderCalendar).Items End Sub |
Ads |
#2
|
|||
|
|||
![]()
Am Fri, 27 Jan 2006 08:01:03 -0800 schrieb Jim Burke in Novi:
Jim, at least after code changes it´s clear: Then you really need to start Outlook again, or place the cursor into the Application_Startup event and press F5 to run the procedure again. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.vbOffice.net -- My events for appointment items being added or changed aren't always triggered when I add or change an appointment. Sometimes, after I start a session , they don't tirgger at all, and I have to restart (sometimes more than once) before they'll get triggered. And if I make VBA coding changes this seems to cause them not to be trigerred also. There must be somethiing I don't understand about Outlook's programming envrionment. I know the events aren't being triggered because I'll put break points on the very first statement in both events and they never get reached. Here is the code I have in ThisOutlookSession for my events (I checked in the code to see if my WithEvents variable is ever reset anywhere and it's not)... Public WithEvents m_colCalItems As Outlook.Items Public Sub m_colCalItems_ItemAdd(ByVal item As Object) If item.Class = olAppointment Then Call ApptAddedOrChanged(item) End If End Sub Public Sub m_colCalItems_ItemChange(ByVal item As Object) If item.Class = olAppointment Then Call ApptAddedOrChanged(item) End If End Sub Private Sub Application_Startup() Set m_colCalItems = Application.GetNamespace("MAPI").GetDefaultFolder( olFolderCalendar).Items End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why do events dissapear | Melsamer | Outlook - Calandaring | 0 | February 27th 06 02:11 PM |
Displaying 7+ events across on calendar. | DCSloan | Outlook - Calandaring | 4 | February 9th 06 07:51 PM |
Copy all events from my old calendar into a new one?? | news | Outlook - General Queries | 1 | February 2nd 06 02:55 PM |
set up reccurring events | sam3136 | Outlook - Calandaring | 1 | January 26th 06 03:01 AM |
Scheduled events appear duplicated | Zardina | Outlook - Calandaring | 0 | January 18th 06 04:40 PM |