Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When sending email from Excel is it possible to remove warning Msg?

Status
Not open for further replies.

Plato2

Programmer
Joined
Dec 6, 2002
Messages
192
Location
US
I'm sending email from Excel file. And it always displays a warning message asking a user if he wants to allow it?.
Is it possible to disable this message?
The way I'm sending email from Excel is:
Dim x As Outlook.Application
Dim y As Outlook.MailItem
Set x = New Outlook.Application
Set y = x.CreateItem(olMailItem)
y.Subject = "Hello"
ActiveWorkbook.HasRoutingSlip = True
y.Recipients.Add ("email@server.com")
y.Body = "Hello there"
y.Send

Thanks in advance
 
Look into

Application.DisplayAlerts = False

within Excel. This may help you - it supresses many of the Alerts given by Excel.

HTH.

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
cLFlaVA,

That wont work in this case, the warning message is part of Outlook, not Excel.
 
Do a google search for outlook object model guard
As Dimandja said, redemption seems to be a good tool.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Try a wonderful little program called "ClickYes".

It is available from and is freeware.

After installing, you can use VBA code shown at the website to check if ClickYes is active and if not make it active and then the security message is automatically answered for you.

I regularly mail merge to email and ClickYes has preserved my sanity by automatically answering Yes for me.

Paul
 
Please also check the FAQs area before posting - there are at least 3 that deal with this - one of which uses the ClickYes feature advocated by PBAPaul (and I guess, myself, being as I wrote the FAQ) and a coupla other workarounds as well

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top