no events firing in ThisOutlookSession

N

Nate Hekman

I wrote a simple Application_ItemSend event handler for ThisOutlookSession.
It was working fine, but unexpectedly (I think when I shut down Outlook and
reran it) quit working. It's not even being called anymore. I've written
an Application_Startup() event handler too just to test it, and it's not
being called either. What am I missing?!


Option Explicit

Private Sub Application_Startup()
MsgBox ("startup")
End Sub

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Cancel = (MsgBox ("Send item?", vbYesNo) = vbNo)
End Sub



Nate Hekman
Calgary, Alberta, Canada
 
S

Sue Mosher [MVP-Outlook]

Have you checked your macro security settings in Tools | Macro | Security?
 
N

Nate Hekman

No I hadn't. I just did check, and it was set to Medium. I changed it to
Low and still no luck.

So if I understand right, I *should* be able to just hit Alt-F11, type in my
code as below, hit Save, and that's it? No reboot needed, no "hooking it
up" somehow, etc?
 
N

Nate Hekman

Oh, wait! I got it! I had to set my macro security to Low and then exit
and rerun Outlook. Now it's working. Thanks for your help, Sue.


Nate
 

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