Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

MS Outlook Alert Message

0

I've set up auto email from a button with a MsgBox option to confirm email send.  I'm getting an MS Outlook alert message that says A programme is trying to send an email on your behlaf.....then option to Allow, Deny or Help.  Can this be avoided somehow, its not very user friendly

Answer
Discuss

Answers

0

Hi Chris and welcome to the Forum 

I don't have this issue but read that 2 approaches work.

1) instead of using .Send in VBA (to send the email you created), delay slightly and use the old Sendkeys function to emulate clicking the Send button in a displayed Outlook message. Replace your line .Send with:

.Display
Application.Wait (Now + TimeValue("0:00:05"))
Application.SendKeys "%s"
(where 05 means 5 seconds, though you may be able to reduce that)

2) Use a third party tool, like the free Advanced Security for Outlook to bypass the security check (but note that particular tool has been replaced by another, Outlook Security Manager).

Suggest you try option 1 then, should that fail, option 2 (unless time is an issue e.g. when sending many emails).

Discuss

Discussion

Chris. Did that help?
John_Ru (rep: 6142) Mar 26, '21 at 4:43 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login