Abraham Alex

I am trying to integrate my application into Outlook. I am using the outlook API. Whenever I try to access the address book object or any similar object via code, I get a dialog box from Outlook -

"A program is trying to access email addresses stored in Outlook. Do you want to allow this If this is unexpected, it may be a virus and you should choose "No"" ....And i can specify to allow it for 1, 5 or 10 minutes.

The code continues to work fine if I click yes. I checked other forumns and found that there are softwares that vendors have created that automatically click the yes button and resolves the issue.

What is the proper way to resolve this issue. Is there any way of digitally signing the code for outlook to trust the application or is there any setting where the administrator can specify that they trust the code from my application

Am I using the wrong API I noticed that the Redemption API allows you to get around this problem but it has to be purchased. Surely the outlook API should have some way to allow Administrators to configure to trust the code from an application!!



Re: Visual Studio Tools for Office A program is trying to access email addresses stored in Outlook.

X4U

Hello Alex,

there are different approaches.

It depends on what and how you are accessing the AddressBook.
If you are using a VSTO AddIn, it depends on how do you acces the addressbook. Normal the Globals.ThisAddIn.Application object is safe.

If you use an applicationobject e.g. Outlook.Application app = new Outlook.Application or using the object from current Inspector - it's not safe.

If you comming from outside (no AddIn) - there are different approaches and also vendors that helps you accessing safe objects.

You also have the option to access safe properties using Extended MAPI.

Here are some resources:

http://www.outlookcode.com/codedetail.aspx id=1112

or better

http://www.codeproject.com/office/BridgingTheGap.asp

Sue Moshers site is a great resource on this.

http://www.outlookcode.com/article.aspx id=52

Hope this helps,

greets, Helmut






Re: Visual Studio Tools for Office A program is trying to access email addresses stored in Outlook.

Abraham Alex

Brilliant! Thats exactly what I was looking for.

Alex