Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / May 2005

Tip: Looking for answers? Try searching our database.

How to Circumvent Email Macro Security...?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff Harbin - 02 May 2005 20:44 GMT
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
Jeff Conrad - 02 May 2005 20:54 GMT
> I'm using Outlook and ACCESS 2003 for this application.
>
[quoted text clipped - 10 lines]
>
> 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 = "emailaddress@something.com"
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,
Signature

Jeff Conrad
Access Junkie
Bend, Oregon

Jeff Harbin - 04 May 2005 14:08 GMT
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

> > I'm using Outlook and ACCESS 2003 for this application.
> >
[quoted text clipped - 52 lines]
>
> Hope that helps you,
Jeff Conrad - 04 May 2005 17:01 GMT
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.
Signature

Jeff Conrad
Access Junkie
Bend, Oregon

Jeff Harbin - 05 May 2005 04:09 GMT
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...

> Hi Jeff,
>
[quoted text clipped - 22 lines]
>
> You're welcome.
Jeff Conrad - 05 May 2005 05:44 GMT
> OK...here's what I've got.
>
[quoted text clipped - 4 lines]
>
> Thanks...

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

Jeff Conrad
Access Junkie
Bend, Oregon

Howard Kaikow - 03 May 2005 05:29 GMT
> I'm using Outlook and ACCESS 2003 for this application.
>
[quoted text clipped - 10 lines]
>
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.