Email without ALLOW message

toobig

New Member
Joined
Feb 22, 2011
Messages
8
I need some help on figuring out how to send an email through Excel without getting the Microsoft Security message that asks you to Allow the message to be sent. Here is what I have now. Any help yould be greatly appreciated. Thanks...

Sub Mail_ActiveSheet()

Dim strDate As String
Dim Site As String
Dim Project As String


Site = Sheets("CDLEmail").Range("A6").Value
Project = Sheets("CDLEmail").Range("A8").Value
strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss")

ActiveSheet.Copy
Application.DisplayAlerts = False

ActiveWorkbook.SendMail "email.com", _
"CDL Maintenance for " & Site & " " & Project & " " & strDate
ActiveWorkbook.Close savechanges:=False
Application.DisplayAlerts = True

End Sub
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I don't have the routine to hand that i use, though bear in mind, if your using outlook, it has to be started to send the mail
 
Upvote 0
I believe this is caused by your anti virus software.
If it's anything like mine, you will have to go to the Anti virus tools and adjust your Email security settings.
 
Upvote 0
Hi Smitty
Thanks for pointing that out, I stand corrected.....as usual.... LOL !
I love having big brother keeping an eye on what I do.
 
Upvote 0
Not big brother at all (at least I didn't intend it that way). I just spent a lot of time going through this one on several projects. ;)
 
Upvote 0
my apologies Smitty, I didn't mean you, I was referring to Big Brother Microsoft !!!
 
Upvote 0
Thanks for all the help. I ended up going another route which worked better for what I need to do.I thought I might be able to get away with less code but the long ways is usually more bullet proof in the end.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top