Tom Urtis
MrExcel MVP
- Joined
- Feb 10, 2002
- Messages
- 11,305
Hello everyone - -
Situation
As most of you know, when sending an email in code from Excel through Outlook, the following Microsoft Office Outlook dialog appears during code execution in Office releases since 2002:
A Program is trying to automatically send e-mail on your behalf.
Do you want to allow this?
If this is unexpected, it may be a virus and you should choose "No".
Two buttons: [Yes] [No]
Question
Has anyone used or developed code that bypasses this prompt, and if so, would you please post an example of your code here. What I would like is a macro in VBA and / or API that you know from your own first-hand experience has worked for you, that emails an Excel attachment from Excel, using Outlook (not Outlook Express) as the email client, which bypasses the above prompt.
Disqualifiers
(1)
I am aware of but cannot use any commercial utility programs such as Redemption or "ClickYes" from ContextMagic. This project will need to run on systems not allowed to download such utilities.
(2)
I am aware of email-related sites such as Ron Debruin's and others. Respectfully, I do not want or need links to those sites. Taking nothing away from Ron or anyone else, I have visited dozens of sites and tested lots of code including my own, but have not found, modified, or been able to develop code that actually does what I am asking for.
(3)
I cannot use the CDO method. I will not know what my end user clients' SMTP server addresses will be.
(4)
The solution cannot involve C++ or other development languages. Only a stand-alone macro in an Excel workbook that uses VBA and / or API will suffice.
(5)
I cannot use an older Office pre-security prompt version. This project will need to be executed on Office 2003 applications.
Qualifiers
(1)
Early or late binding is OK.
(2)
Establishing any VBA Project library references would be no problem.
(3)
Must be VBA / API code for an Excel macro that sends an Email with an Excel attachment in Outlook which bypasses the Outlook security prompt.
(4)
The code you post has been tested successfully by you.
Many thanks to you VBA and API wizards out there who can help me develop this solution, if indeed a solution is possible given the disqualifiers.
Situation
As most of you know, when sending an email in code from Excel through Outlook, the following Microsoft Office Outlook dialog appears during code execution in Office releases since 2002:
A Program is trying to automatically send e-mail on your behalf.
Do you want to allow this?
If this is unexpected, it may be a virus and you should choose "No".
Two buttons: [Yes] [No]
Question
Has anyone used or developed code that bypasses this prompt, and if so, would you please post an example of your code here. What I would like is a macro in VBA and / or API that you know from your own first-hand experience has worked for you, that emails an Excel attachment from Excel, using Outlook (not Outlook Express) as the email client, which bypasses the above prompt.
Disqualifiers
(1)
I am aware of but cannot use any commercial utility programs such as Redemption or "ClickYes" from ContextMagic. This project will need to run on systems not allowed to download such utilities.
(2)
I am aware of email-related sites such as Ron Debruin's and others. Respectfully, I do not want or need links to those sites. Taking nothing away from Ron or anyone else, I have visited dozens of sites and tested lots of code including my own, but have not found, modified, or been able to develop code that actually does what I am asking for.
(3)
I cannot use the CDO method. I will not know what my end user clients' SMTP server addresses will be.
(4)
The solution cannot involve C++ or other development languages. Only a stand-alone macro in an Excel workbook that uses VBA and / or API will suffice.
(5)
I cannot use an older Office pre-security prompt version. This project will need to be executed on Office 2003 applications.
Qualifiers
(1)
Early or late binding is OK.
(2)
Establishing any VBA Project library references would be no problem.
(3)
Must be VBA / API code for an Excel macro that sends an Email with an Excel attachment in Outlook which bypasses the Outlook security prompt.
(4)
The code you post has been tested successfully by you.
Many thanks to you VBA and API wizards out there who can help me develop this solution, if indeed a solution is possible given the disqualifiers.