> ItemAdd will fail to fire if 16 or more items are added to the Inbox at a
> time. That's a hard limitation from MAPI. Your code may be disabled if you
> have errors and aren't trapping or handling them.
>
> --
> Ken Slovak
> [MVP - Outlook]
>
http://www.slovaktech.com> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
>
http://www.slovaktech.com/products.htm>
>
> "DavidE" <DavidE[ at ]discussions.microsoft.com> wrote in message
> news:508FA173-F4CD-4BC7-9D77-33FDC38C9343[ at ]microsoft.com...
> > Hi,
> >
> > I created a com add-in that fires an event when a new mail arrives. This
> > is
> > the code:
> > Private WithEvents objNS As Outlook.NameSpace
> > Private WithEvents colItems As Outlook.Items
> >
> > Private Sub Application_Startup()
> > Set objNS = Application.GetNamespace("MAPI") 'NameSpace Object
> > Set colItems = objNS.GetDefaultFolder(olFolderInbox).Items
> > ....
> > End Sub
> >
> > Private Sub colItems_ItemAdd(ByVal Item As Object)
> > Code to handle incoming mail
> > End Sub
> >
> > Usually, this code does the work but some times it doesn't. When it stop
> > working the event doesn't fire for all incoming mails. I fix it by closing
> > and reopen the outlook. When the outlook is reopen it loads the
> > add-in.Some
> > times I need to restart the computer. I tried to solve this problem by
> > cretaing a schedule task for a bat file that contain a regsvr32 command
> > for
> > this dll but it doesn't solve the problem. I don't think that it's a
> > problem
> > of code but I think that it's a problem of the outlook that unload the
> > add-in
> > without a logical reason.
> >
> > I'll glad to get help for this problem.
> >
> > Thanks,
> >
> > David
>
>