Disable Outlook Security Notification

G

Guest

Hi,

I have a database which includes a table of "contacts." I'd like users to be able to, by pushing a button on frmContacts, create a new email in Outlook addressed to the current contact (i.e., the contact whose information currently appears in frmContacts).

The code I've provided below seems to create the mail item I need; however, it also results in an Outlook security notice: "A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?"

Two questions:
1) How do I disable this notification?
2) Why does Outlook think the code is trying to access the user's Outlook addressbook? The code is only creating a new email item and populating the recipient list with an e-mail address from Access (not Outlook).

Thanks in advance for any assistance,

Matt

[Win2000/Access2002/Outlook2002]

'------------------
Private Sub cmdEmail_Click()
Dim OutlookApp As Outlook.Application
Dim NewInspector As Outlook.Inspector
Dim NewMailItem As Outlook.MailItem

Set OutlookApp = CreateObject("Outlook.Application")
Set NewMailItem = OutlookApp.CreateItem(olMailItem)
NewMailItem.Recipients.Add (Me.ContEmail)
Set NewInspector = NewMailItem.GetInspector
NewInspector.Activate

Set NewInspector = Nothing
Set NewMailItem = Nothing
Set OutlookApp = Nothing

End Sub
 
A

Alex Dybenko

look at this one:
http://www.dimastr.com/redemption/

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Matt said:
Hi,

I have a database which includes a table of "contacts." I'd like users to
be able to, by pushing a button on frmContacts, create a new email in
Outlook addressed to the current contact (i.e., the contact whose
information currently appears in frmContacts).
The code I've provided below seems to create the mail item I need;
however, it also results in an Outlook security notice: "A program is trying
to access e-mail addresses you have stored in Outlook. Do you want to allow
this?"
Two questions:
1) How do I disable this notification?
2) Why does Outlook think the code is trying to access the user's Outlook
addressbook? The code is only creating a new email item and populating the
recipient list with an e-mail address from Access (not Outlook).
Thanks in advance for any assistance,

Matt

[Win2000/Access2002/Outlook2002]

'------------------
Private Sub cmdEmail_Click()
Dim OutlookApp As Outlook.Application
Dim NewInspector As Outlook.Inspector
Dim NewMailItem As Outlook.MailItem

Set OutlookApp = CreateObject("Outlook.Application")
Set NewMailItem = OutlookApp.CreateItem(olMailItem)
NewMailItem.Recipients.Add (Me.ContEmail)
Set NewInspector = NewMailItem.GetInspector
NewInspector.Activate

Set NewInspector = Nothing
Set NewMailItem = Nothing
Set OutlookApp = Nothing

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top