Application_ItemSend not firing even with low security

  • Thread starter Thread starter Remou
  • Start date Start date
R

Remou

The code below does not fire in Outlook 2010 when I send an email even when I
set the macro level to no warnings and restart Outlook. I can step through
and run other code. Outlook is not set as my default mail program.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
MsgBox "Hi"
End Sub
 
The problem was that I had installed Outlook 2010 after Outlook 2000, as far
as I can tell, so the library referenced was Outlook 9.0 (msoutl9.olb),
rather than Outlook 14.0 (msoutl.olb). I renamed
C:\Users\%User%\AppData\Roaming\Microsoft\Outlook\VbaProject.OTM to
VbaProject.OLD and this appears to have sorted everything out.
 
Back
Top