PDA

View Full Version : Sleeper: Override Outlook Do you want to send option



hcadar1
08-09-2005, 01:23 PM
Hi all,

I am attempting to automate the morning reports my organization runs, the process I am using to send an email is :


Sub eMailMgmtReport()
Dim OL As Object
Dim EmailItem As Object
Dim Wb As Workbook
Dim RptDate As Date
Application.ScreenUpdating = False
Set OL = CreateObject("Outlook.Application")
Set EmailItem = OL.CreateItem(olMailItem)
Set Wb = ActiveWorkbook
Wb.save
With EmailItem
.Subject = "VoIP SIP TT Breakdown"
.Body = "All," & vbCrLf & "Attached you find the VoIP-SIP TT breakdown."
.To = someone@someone.net
.Importance = olImportanceNormal 'Or olImprotanceHigh Or olImprotanceLow
.Attachments.Add Wb.FullName
.Send
End With
Application.ScreenUpdating = True
Set Wb = Nothing
Set OL = Nothing
Set EmailItem = Nothing
End Sub

It works great with the exception that when it trys to send outlook presents with a message "Another applicaiton is trying to send an email... Click yes if you wish to allow this action to be performed"

Is there anyway to overide this. ?

Bob Phillips
08-09-2005, 03:37 PM
Take a look here http://www.rondebruin.nl/mail/prevent.htm