[AccessD] Sending email from Access

William Benson (VBACreations.Com) vbacreations at gmail.com
Tue Aug 23 18:02:52 CDT 2011


If you use CDO, I believe that there should not be an Outlook security
message ... except that you will not get a copy of the message in Sent.
There is good and fairly stable code out there for CDO. And there is another
option, Redemption for Outlook. This page deals with Excel but it is very
similar and easy to customize for other applications such as Access.

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


This has stuff to help from Access, though I have not personally tried.

http://www.tek-tips.com/viewthread.cfm?qid=1311726&page=1


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns
Sent: Tuesday, August 23, 2011 6:28 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Sending email from Access

Yes, every version of Outlook from 2002 on includes the object model guard.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Helmut Kotsch
Sent: Tuesday, August 23, 2011 1:33 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Sending email from Access

I did the same but that was with Outlook 2000. I thought that higher levels
of Outlook did not show this problem. I have never verified that.

Helmut

-----Ursprungliche Nachricht-----
Von: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]Im Auftrag von Rocky Smolin
Gesendet: Dienstag, 23. August 2011 22:21
An: 'Access Developers discussion and problem solving'
Betreff: Re: [AccessD] Sending email from Access


I use ClickYes to get around the Outlook problem
(http://www.contextmagic.com/express-clickyes/)  but that means you have to
deploy clickyes on all the machines.

Rocky


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darrell Burns
Sent: August 23, 2011 1:15 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Sending email from Access

I'm developing an A2010 app that, among other things, needs to distribute
email notifications to a small list of recipients. The recipient list is
maintained in an Access table, so all I need to do is SEND. There are 3
obstacles I need to overcome:

1. There are about 100 workstations, running everything from XP/Office2003
to Windows7/Office2010, and I can't be messing with their administrative
options.
2. The eMails must be sent without operator intervention; i.e., no security
pop-ups (what Outlook refers to as the "object model guard").
3.  The app must be deployed as a runtime, preferably with no 3rd-party
attachments (like Redemption).

I've developed a partial solution that makes calls to the Outlook object
model. It gets around obstacle #1 by using late-binding so it won't be
dependent on a particular version:

Dim objOutlook As Object
Dim objMailItem As Object
Const olMailItem as integer = 0
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem) objMailItem.Subject =
strSubject objMailItem.Body = strBody objMailItem.Send

This solution works (as long as Outlook is already open); however, it
doesn't satisfy Obstacle #2 because the security warning does pop up.

Anybody know of a way to get around the Outlook object model guard?

Thanx!

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list