Events no longer firing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am a newbie; I wrote the following code as VBA in Outlook:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If (Not Item.Class = olMail) Then Exit Sub

If (Item.Subject = "") Then
answer = MsgBox("Do you want to send the message without entering
a subject", vbYesNo, vbSystemModal)
If (answer = vbNo) Then
Cancel = True
End If
End If
End Sub


The code worked fine "till" I restarted outlook. It's weird that it's no
longer working. Can anyone give me some ideas? I am not using Exchange
Server. The code had been written for "ThisOutlookSession." Any help will
be highly appreciated.

/jaywalker
 
OK; I got it. VBA isn't loading. Setting the Macro security to Medium
prompted me whether I want to run macros or not. If I say Yes,
everything works fine.
 
Back
Top