Importing from Outlook - how to remove the alert.

D

donbowyer

I use MS Office 2003 on Win XP

The following is the first few lines of code I'm using to import Outlook
contact information.
It works fine, but I get the standard alert dialog box saying that a program
(my Code) is trying to access addresses stored in Outlook. I allow access for
1 minute and all is well, except I don't need the alert.
Trawling the various knowledge bases suggests that if I use the intrinsic
Application object (not NewApplication) I won't get the alert.
Not so with the code below.
Somewhere else suggested a digital signature was the answer.
I have created a SelfCert signature and applied it to this code.
It is recognised and works, but still I get the alert.

Sub ImportPhone()
Dim olApplication As Outlook.Application
Dim olNSpace As Outlook.Namespace
Dim olJournalFolder As Outlook.MAPIFolder
Dim olJournalItem As Outlook.JournalItem
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Dim lnCount As Long, i As Long

Set olApplication = Outlook.Application
Set olNSpace = olApplication.GetNamespace("MAPI")
Set olJournalFolder = olNSpace.GetDefaultFolder(olFolderJournal)
How can I stop it appearing??
 
J

Jean-Yves

HI,
It just depends on how good you want to have your email protected.
Reduce your macro security, if you want to take the risk.
I also found that there was another program (or ADDIN) that was call
Outlook?????(something like OutlookdDefender ?)
that you can use . Google to "How to avoid outlook macro warning.
Regards
JY
 

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