Security issue accessing outlook from a Word Add-in

Hello

I am currently developing a Word 2007 add-in (C# VSTO) that access some contact information in outlook (2007). I get the "A program is trying to access e-mail address info... etc." warning. How can this be avoided and is there any possiblity of deploying it automatically

I read a lot about group policy, and trusting COM add-ins, but the addin should be able to run on a standalone machine aswell, so kind of ruled out that as an option.. Is this wrong

Sadly the deployment section on technet is all empty.

Hope you can help



Answer this question

Security issue accessing outlook from a Word Add-in

  • cashrolls2

    I did google and search on msdn/technet (allways do that)- hence came up with the empty articles.. All the other info I dug up was about Outlook add-ins running in outlook... Im able to avoid the warnings by turning off the security, but thats not a valid solution :) What remains to test is running with antivirus program enabled, will do this monday (read somewhere this should help running add-ins). Reason I posted was to hear if anyone had similar experiences..
  • ejamashu

    Hi Mikkel

    I agree with Cindy, the Outlook programming newsgroup is probably the best place to get help on this Outlook specific question. You can find that here (http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.outlook.vba&lang=en&cr=US).

    Mike


  • Allen_Iowa

    Thanks for your reply, Harry

    It doesnt seem to resolve my problem though, as my add-in is a Word Add-in, and hence the ThisApplication object is Word :)

    It seems my only choice is to get the Outlook application by using :

    new Microsoft.Office.Interop.Outlook.Application();

    Or am I mistaken


  • LynnOoi

    Hi Mikkel

    The Outlook programming newsgroup I linked to in my other reply would be the best place to get a discussion going :-)



  • worldhello

    Hi Mikkel

    The Outlook specialists happen by here only sporadically, which is why I'm posting a reply to you "now". This is an Outlook security issue - you'd get the same no matter what programming language you use to address Outlook's object model from outside Outlook.

    If you browse through the Outlook dev newsgroup (or do a Google search on it) you'd certainly pick up information on how the security measure behaves, and what you can do to work with/around it. There's probably also information if you do a Knowledge Base search.



  • David - Bitfield

    Mikkel, you have several options, all listed at http://www.outlookcode.com/d/sec.htm . The most relevant are likely to be (a) building an Outlook add-in that exposes methods that your Word add-in can call and (b) keeping the code all in the Word add-in but using the third-party Outlook Redemption library (http://www.dimastr.com/redemption/) to avoid the security prompts.
  • Pete Orologas

    Also, have a look at this topic in the Visual Studio Tools for Office documentation, in the section "Code Is Blocked by the Outlook Object Model Guard":

    Specific Security Considerations for Office Solutions

    http://msdn2.microsoft.com/en-us/library/1thd35d7(VS.80).aspx

    Harry Miller
    Technical Editor
    http://blogs.msdn.com/harrymiller
    This posting is provided "AS IS" with no warranties, and confers no rights.


  • Security issue accessing outlook from a Word Add-in