look at this one:
http://www.dimastr.com/redemption/
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
"Matt" <(E-Mail Removed)> wrote in message
news:2C59C162-4AB2-43FA-9268-(E-Mail Removed)...
>
> 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