Hi!
I'm hoping someone here can help me be stubborn I use VBA to send several hundred emails to our corporate customers, and ever since that wonderful SR-1 patch, I get the "A program is trying to automatically send e-mail on your behalf" error. Now, I have been using ClickYes as a stopgap, but I want to actually code things so that I don't have to use that anymore. I recall when this first came up seeing some code ideas that would help, but I can't find them anymore.
So, here's where I'm at. Exchange environment, Outlook 2003, no I can't get the sysadmin to change the security setting, and I'd like to use regular VBA instead of an addin like Outlook Redemption, if it's possible, as I'd like the code to be portable with as little hassle as possible.
Here's my snippet as it is now:
I'd really appreciate any tips anyone has. I've been googling, but I'm still trying to decipher which solutions will work with Exchange, and which require SMTP.
Cheers!
Cerv
I'm hoping someone here can help me be stubborn I use VBA to send several hundred emails to our corporate customers, and ever since that wonderful SR-1 patch, I get the "A program is trying to automatically send e-mail on your behalf" error. Now, I have been using ClickYes as a stopgap, but I want to actually code things so that I don't have to use that anymore. I recall when this first came up seeing some code ideas that would help, but I can't find them anymore.
So, here's where I'm at. Exchange environment, Outlook 2003, no I can't get the sysadmin to change the security setting, and I'd like to use regular VBA instead of an addin like Outlook Redemption, if it's possible, as I'd like the code to be portable with as little hassle as possible.
Here's my snippet as it is now:
Code:
ActiveWorkbook.SaveAs "G:\Files\" & strCustomerName & " - " & ReportMonth, xlWorkbookNormal
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = strMailGroup 'a variable preloaded with the email addy
.CC = ""
.BCC = ""
.Subject = "Our Company " & ReportMonth & " eBilling - " & strCustomerName
.Attachments.Add ActiveWorkbook.FullName
.Body = TextBody & SpecialMessage & Signature
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
ActiveWorkbook.Close
I'd really appreciate any tips anyone has. I've been googling, but I'm still trying to decipher which solutions will work with Exchange, and which require SMTP.
Cheers!
Cerv