Outlook VBA events stop firing

  • Thread starter Gordon Prince, MCP
  • Start date
G

Gordon Prince, MCP

I've got Outlook VBA running at a site with 30 PC's. Several of the people
are reporting the problem that the following Outlook VBA code stops
working -- sometimes.

----------------------------------------------------------------------------
----

Public WithEvents myInspectors As Outlook.Inspectors
Public WithEvents myMailItem As Outlook.MailItem

Private Sub myInspectors_NewInspector(ByVal Inspector As Outlook.Inspector)
If TypeName(Inspector.CurrentItem) = "MailItem" Then Set myMailItem =
Inspector.CurrentItem
End Sub

Private Sub myMailItem_AttachmentRead(ByVal Attachment As
Outlook.Attachment)
I won't bore you with the details of the code that's in here
end sub

----------------------------------------------------------------------------
----

When the user first starts Outlook, everything works fine. Sometimes it
works all day, sometimes it fires a couple of times and then stops firing.
Sometimes closing Outlook and restarting it brings it back to life.
Sometimes a reboot is required.

For trouble shooting, I added this to everyone's VBA code:

----------------------------------------------------------------------------
----

Private Sub Application_Quit()
MsgBox "Outlook has finished closing.", vbInformation
End Sub

----------------------------------------------------------------------------
----

When the myMailItem_AttachmentRead() has stopped firing, closing Outlook
doesn't generate the msgbox from Application_Quit(), either. It seems like
all the VBA events have stopped fireing.

Everyone's using Outlook 2002 with SP2.

Any ideas what could be causing this behavior?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top