How to Circumvent Email Macro Security...?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using Outlook and ACCESS 2003 for this application.

I am trying to use the SendObject command in a macro to send a HTML version
of a report that I have created in ACCESS 2003.

Everything works fine w/1 exception. Manually running the macro I get the
message "A program is automatically trying to send email on your behalf. Do
you want to allow this?"

If I select YES the report is sent in an email as expected. However, this
process is to be done automatically prior to my arrival and I do not want to
require interaction w/this macro Security feature.

How can I circumvent this?

Thank,

Jeff
 
in message:
I'm using Outlook and ACCESS 2003 for this application.

I am trying to use the SendObject command in a macro to send a HTML version
of a report that I have created in ACCESS 2003.

Everything works fine w/1 exception. Manually running the macro I get the
message "A program is automatically trying to send email on your behalf. Do
you want to allow this?"

If I select YES the report is sent in an email as expected. However, this
process is to be done automatically prior to my arrival and I do not want to
require interaction w/this macro Security feature.

How can I circumvent this?

Hi Jeff,

Here is some info on this subject which should help.

From a past post by the angelic MVP Cheryl Fischer:Unless you are working in an Exchange environment, these prompts cannot be
turned off. If you are working in the Exchange environment see:
http://www.outlookcode.com/d/sec.htm

To work around this feature, I have been pleased with Express Soft's free
utility called "ClickYes", available for download at:
http://www.express-soft.com/mailmate/clickyes.html. It does not make the
security prompt go away, but it does use api calls to click the 'Yes' button
for you. Here is a link to a thread where you can find code that will check
to see whether ClickYes is running, start the utility, run email-related
code, and then turn the utility off. http://tinyurl.com/3x3xj

ClickYes is not the only work-around or option available; others can be
found at: http://www.outlookcode.com/d/sec.htm
And a post by someone named John Conklin:I found this on a website somewhere and just put it into my database, and it
works great.

Set outl = CreateObject("Outlook.Application")
Set mail = outl.CreateItem(olMailItem)
mail.To = "(e-mail address removed)"
mail.Subject = ActiveWorkbook.Name
mail.attachments.Add (ActiveWorkbook.FullName)
mail.display
SendKeys "^{ENTER}"

Set outl = Nothing
Set mail = Nothing
This link may also be of assistance:
http://office.microsoft.com/en-us/assistance/HA011402931033.aspx

Hope that helps you,
 
Jeff Harbin said:
I'm using Outlook and ACCESS 2003 for this application.

I am trying to use the SendObject command in a macro to send a HTML version
of a report that I have created in ACCESS 2003.

Everything works fine w/1 exception. Manually running the macro I get the
message "A program is automatically trying to send email on your behalf. Do
you want to allow this?"

If I select YES the report is sent in an email as expected. However, this
process is to be done automatically prior to my arrival and I do not want to
require interaction w/this macro Security feature.

How can I circumvent this?

You likely can "cheat" and activate another Office app from which ou could
send the mail.
I'ved nottried this, but DisplayAlerts in Excel might hide those messages.
 
Ok...using the provided code and stuff that I've discovered via internet
research I can create and send an email from ACCESS w/o the irritating Macro
Security warning message.

Now I need to know how to convert my report to a saved HTML document to
attach to the email message.

Suggestions?

Thanks so far...

Jeff
 
in message:

Hi Jeff,
Ok...using the provided code and stuff that I've discovered via internet
research I can create and send an email from ACCESS w/o the irritating Macro
Security warning message.
Good.

Now I need to know how to convert my report to a saved HTML document to
attach to the email message.

Suggestions?

Use the SendObject command. Here is a really simple example:

DoCmd.SendObject acSendReport, "rptVendorPhoneList", acFormatHTML

Look up "SendObject" in Access Help for a complete description of
all the arguments. Alternatively, use the "OutputTo" method to save the
file to a folder somewhere. Look up the arguments for that as well if
interested.
Thanks so far...

You're welcome.
 
OK...here's what I've got.

The SendObject command won't work. That gives me the Email Security
Dialogue box. However, using the DoCmd.OutputTo command I was able to
attach the report to an email created via the CreateObject method and
successfully send it w/o the Email Security Dialogue appearing.

Thanks...
 
in message:
OK...here's what I've got.

The SendObject command won't work. That gives me the Email Security
Dialogue box. However, using the DoCmd.OutputTo command I was able to
attach the report to an email created via the CreateObject method and
successfully send it w/o the Email Security Dialogue appearing.

Thanks...

All right, glad to hear you have it working now!
Good luck with your project.
 
Back
Top