Excel VB Script Sendmail

I have an excel workbook that I use to track action items. If there is an item overdue it sends an email. when I run the code and there is an overdue item, it still have to click "Allow" for outlook. is there a way in my vb script code to turn off the outlook dialog?

Workbooks("Action Item List Definitions & Instructions.xlsx").SendMail Recipients:=ToWhom, Subject:="Action Item Assigned! Go to <\\Birmingham\GolfPros\Staff Meetings\02-Meetings_&_Action_Register\ Action Items.xls>"

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
What version of Outlook are you running.  On recent versions, you should be able to go into the Options, Trust Center, Trust Center Settings, Programmatic Access, and then select the choice that says something like "don't warn me...".

The other alternative is to change the way you are sending the email to use CDO instead, I think that will prevent the message as well.  A good resource for more info on that:



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jlcannonAuthor Commented:
CDO is the way to go since outlook admin has programmatic access locked.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.