VBA add-in disabled on startup of Outlook

  • Thread starter Thread starter Tony Cancilla
  • Start date Start date
T

Tony Cancilla

I'm attempting my first Outlook VBA macro using some of
the examples in the help files to get started. I am
using events and handling the SyncObject's SyncEnd event
(See code below). My macro seems to work. However, when
I shutdown and restart Outlook I get the following error
on startup everytime:

"Outlook experience a serious error the last time the add-
in 'microsoft vba for outlook addin' was opened. Would
you like to disable this add-in? To reactivate this add-
in, click About Microsoft Office Outlook on the Help
menu, and then click Disabled Items"

I'm using Office 2003 Student and Teacher Edition on
Windows XP Pro.

Code under "ThisOutlookSession"

Dim myClass As New Class1
Private Sub Application_Startup()
myClass.Initialize_handler
End Sub



Code under "Class1" (Class Module)

Dim myOlApp As New Outlook.Application
Dim WithEvents mySync As Outlook.SyncObject

Sub Initialize_handler()
Set mySync = myOlApp.Session.SyncObjects.Item(1)
End Sub

Private Sub mySync_SyncEnd()
MsgBox "Synchronization is complete."
End Sub


Any help would be appreciated.

Tony
 
I should add that I have run "Help>>Detect and Repair" and
reinstalled Outlook 2003, but the problem persists. I
have uninstalled and reinstalled VBA in the Outlook 2003
setup.

Dave
 
i have the same problem at my inlaws computer...
outlook 2003. the macro works fine but on restart it givs the sam
error message... i have to click yes.. and then enable the macro
again... its a real drag..

any luck with the answer
 
I have just begun having the same problem. My Macros seem to function fine;
but when Outlook is restarted after they have been used a message shows up
stating that there had been a serious error during the last Outlook session
and vba has to be disabled in order to restart. If I use Outlook but do not
use any macros it will restart without needing to disable vba. Any ideas as
to the cause?
 
You might want to export your modules, exit Outlook, rename vbaproject.otm,
then restart Outlook and import your modules. That would give you a clean
VBA project file.
 
Help with what? The newsgroup interface you are using apparently does not
quote earlier messages in the thread, making your latest message so short on
detail that you risk not getting the answer you're looking for. Please take
the time to quote the original message.
 
Back
Top