Allow access to address book

D

DSPettit

Using VBA in Outlook 2000, I have a simple subroutine set up to send an
e-mail on certain events. When the code gets to the "JulieMsg.Send" line,
Outlook will prompt the user "A program is trying to access e-mail addresses
you have stored in Outlook. Do you want to allow this?" The user has to
allow this action to happen. I really need to automate this feature so that
it doesn't require user intervention. Is there any way to do this with the
code, or with some option settings within Outlook?

The code is as follows:

Sub HighPriorityNotify()

Dim JulieMsg As MailItem
Dim JulieRecip As Recipient

Set JulieMsg = Outlook.Application.CreateItem(olMailItem)

With JulieMsg
Set JulieRecip = .Recipients.Add("John Doe e-page")
JulieRecip.Type = olTo
.Subject = "JULIE - HIGH PRIORITY"

For Each JulieRecip In .Recipients
JulieRecip.Resolve
Next

JulieMsg.Send

End With

Set JulieMsg = Nothing

End Sub

Thanks,
Doug
 

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