email and security in Office 2003

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

Guest

I got the code shown below from the Outlook CHM and it works. My problem is
that it opens a security dialog with a first line that begins: "A program is
trying to automatically send e-mail......" I would like to suppress this
message but cannot find any property in the the Object model that does this
or anywhere in the Options dialog of Outlook itself that permits Automation
applications to be trusted. Any help would be appreciated.

Private Sub CommandButton1_Click()
Dim myMail As Outlook.MailItem
Set myMail = Outlook.Application.CreateItem(olMailItem)
With myMail
.To = "(e-mail address removed)"
.Subject = "Book overdue: " & "Gone with the Wind"
.Body = "Please return this book as soon as possible."
End With
myMail.Send
End Sub
 
Thanks for the input. I went to the site and it sure looks an exact match
for my need. Because this program exists, confirms that I am not overlooking
a simple solution.

Sadly, I am hoping that I can find a different solution. While this
solution is freeware, if I want to port this application to another computer
or rebuild my computer hard disk, it becomes another install to remember. I
have too many of these already. I will use this solution as a last resort.
 
In addition to Tom's suggestion, another way of doing it is using the
Redemption Library, as described by Helen Feddema in her Access Archon
column 113, "Avoiding the Object Model Guardian with the Redemption
Library", at http://www.helenfeddema.com/access.htm

Unfortunately, if you need to distribute your application, this is another
case where you'd need to include the additional .dll file.

As an aside, there's also a couple of articles on the same site which
discuss Access security warnings, such as column 119, "Access 2003 Security
Warnings". Also worth the read.

HTH,

Rob
 
Back
Top