Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / January 2006

Tip: Looking for answers? Try searching our database.

Events not always triggered

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Burke in Novi - 27 Jan 2006 16:01 GMT
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
Michael Bauer - 30 Jan 2006 06:36 GMT
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.

Signature

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
[quoted text clipped - 29 lines]
>    
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.