【问题标题】:Outlook 2007 contacts access warningOutlook 2007 联系人访问警告
【发布时间】:2014-02-03 04:08:25
【问题描述】:

我正在尝试使用以下代码从 Outlook (2007) 获取联系人:

Outlook.Application outlookApp = new Outlook.Application();
Outlook.MAPIFolder fldContacts = outlookApp.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts) as Outlook.MAPIFolder;
foreach (Outlook._ContactItem contact in fldContacts.Items) {...}

问题是当我尝试获取电子邮件地址时,我收到了来自 Outlook 的警告,类似于:

A program is trying to access e-mail address information stored in Outlook.
If this is unexpected, click Deny and verify your antivirus software is up-to-date.
For more information about e-mail safety and how you might be able to avoid getting this warning, click Help.

我希望用户有一个干净的体验(这个提取是为了根据他们的邮件地址向应用程序添加新朋友)。 Skype 无需 Outlook 要求用户批准就可以做到这一点。到目前为止,我由 Google 叔叔找到的解决方案大多是肮脏的黑客,我想知道是否有一种干净的方法来做到这一点。

想法?

【问题讨论】:

    标签: outlook office-interop


    【解决方案1】:

    避免 Outlook 警告的一个很好的干净方法是使用Add-in Express's Outlook Security Manager。它真的很容易使用:

    SecurityManager.DisableOOMWarnings = true; 
    

    【讨论】:

    • 太棒了!正是我需要的。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-11
    • 1970-01-01
    • 2010-10-28
    • 1970-01-01
    • 2019-02-22
    相关资源
    最近更新 更多