ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Email in VBA - getting a warning before sending (https://www.excelbanter.com/excel-programming/382444-email-vba-getting-warning-before-sending.html)

Phrank

Email in VBA - getting a warning before sending
 
I've got VBA code in Excel to send an email to alert someone after
executing my other code. However, I get a warning message that
states, "A program is trying to automatically send email on your
behalf. Do you want to allow this?" I do want to allow this, and I
would prefer to allow it without the warning message. I've read that
there isn't a way to disable this, but I'm hoping that's wrong. I did
find other code that disabled warnings, but it wasn't specifically for
an email warning. This code is:

Application.DisplayAlerts = False

Will this work for the email warning? (I would test it, but I'm not
at work for the next 3 days). Thanks for any advice.


Tom Ogilvy

Email in VBA - getting a warning before sending
 
No, that won't suppress it.

http://www.rondebruin.nl/sendmail.htm

Ron discusses the use of CDO as a work around I believe.

--
Regards,
Tom Ogilvy


"Phrank" wrote in message
...
I've got VBA code in Excel to send an email to alert someone after
executing my other code. However, I get a warning message that
states, "A program is trying to automatically send email on your
behalf. Do you want to allow this?" I do want to allow this, and I
would prefer to allow it without the warning message. I've read that
there isn't a way to disable this, but I'm hoping that's wrong. I did
find other code that disabled warnings, but it wasn't specifically for
an email warning. This code is:

Application.DisplayAlerts = False

Will this work for the email warning? (I would test it, but I'm not
at work for the next 3 days). Thanks for any advice.




Phrank

Email in VBA - getting a warning before sending
 
Thanks Tom! I've read that now, and it leaves me wondering if it will
work on a network (I'm at home right now and can't test this until
Monday). Do you happen to know if it does or not? Thanks Tom.

Frank



On Thu, 1 Feb 2007 22:44:51 -0500, "Tom Ogilvy"
wrote:

No, that won't suppress it.

http://www.rondebruin.nl/sendmail.htm

Ron discusses the use of CDO as a work around I believe.


Tom Ogilvy

Email in VBA - getting a warning before sending
 
I have never had a need to use it myself.

--
Regards,
Tom Ogilvy


"Phrank" wrote:

Thanks Tom! I've read that now, and it leaves me wondering if it will
work on a network (I'm at home right now and can't test this until
Monday). Do you happen to know if it does or not? Thanks Tom.

Frank



On Thu, 1 Feb 2007 22:44:51 -0500, "Tom Ogilvy"
wrote:

No, that won't suppress it.

http://www.rondebruin.nl/sendmail.htm

Ron discusses the use of CDO as a work around I believe.



Ron de Bruin

Email in VBA - getting a warning before sending
 
Hi Phrank

It depend if the IT people block it or not.
But it is possible if the settings are OK

Good news: Outlook 2007 have no problem anymore if you
have good protection installed.



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Phrank" wrote in message ...
Thanks Tom! I've read that now, and it leaves me wondering if it will
work on a network (I'm at home right now and can't test this until
Monday). Do you happen to know if it does or not? Thanks Tom.

Frank



On Thu, 1 Feb 2007 22:44:51 -0500, "Tom Ogilvy"
wrote:

No, that won't suppress it.

http://www.rondebruin.nl/sendmail.htm

Ron discusses the use of CDO as a work around I believe.


Phrank

Email in VBA - getting a warning before sending
 
Thanks Ron. I've sent the file with the updated code to a friend at
work, and he's trying it out for me. I'll let you know what happens.
Thanks again.

On Fri, 2 Feb 2007 15:40:44 +0100, "Ron de Bruin"
wrote:

Hi Phrank

It depend if the IT people block it or not.
But it is possible if the settings are OK

Good news: Outlook 2007 have no problem anymore if you
have good protection installed.



All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com