Trigger Application_ItemSend event when sending using Access macro

G

Grant I

Hi there - I have written a simple bit of code in Outlook's ItemSend event
that works perfectly when sending directly from Outlook. However, I would
really like for it to fire when Access sends an email using the SendObject
function in a macro. It works fine if I have the email open before sending
(i.e. I have to click the send button), but when Access sends without opening
the object, the event does not fire. Any ideas? Wasn't sure whether to post
in Access or Outlook, but thought I'd start here first.

Thanks all!!
 
K

Ken Slovak - [MVP - Outlook]

SendObject uses Simple MAPI and that produces an Inspector that's in the
Inspectors collection but doesn't fire NewInspector, so your code knows
nothing about it. Therefore you can't handle Item.Send since you have no
reference to Item. Use the Outlook object model instead of SendObject.
 

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