PDA

View Full Version : Trapping standard email send



mallycat
11-06-2012, 11:46 AM
I want to trap the normal email sending so that I can turn off a rule, then turn the rule back on after my special message has been sent. I have written the following code, but I don't know the syntax to send an actual email (I will have the email I want to send OPEN and want to send it via the Quick Access Toolbar.

I have issues with the line Application.ActiveWindow.Send


Sub Send_Immediately()

Dim olRules As Outlook.Rules
Dim olRule As Outlook.Rule
Set olRules = Application.Session.DefaultStore.GetRules
Set olRule = olRules.Item("Defer email send by 1 minute")

olRule.Enabled = False
olRules.Save

Application.ActiveWindow.Send

olRule.Enabled = True
olRules.Save

Set olRules = Nothing
Set olRule = Nothing
End Sub

skatonni
11-20-2012, 07:03 PM
ActiveInspector.currentItem.Send

mallycat
11-25-2012, 10:40 PM
thanks. That didn't work, but i worked it out from there. As it turns out, this approach is not going to meet my needs.