有没有办法防止在Outlook中自动解析? [英] Is there a way to prevent autoresolve in outlook?

查看:104
本文介绍了有没有办法防止在Outlook中自动解析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过自动从excel中发送Outlook来发送电子邮件,并设法绕过了有关使用sendkey进行的有关病毒的讨厌警告消息(检查器在调用sendkey之前就已激活).

I am sending email by automating outlook from excel and have managed to bypass the pesky warning message about viruses using sendkeys (with inspector activate just prior to call to sendkeys).

现在,我有时会收到有关允许访问联系人的消息. 我有收件人的电子邮件地址,不需要访问联系人,但是将启动Outlook自动解析,然后出现一个弹出窗口,提示允许访问联系人.这没有5秒的延迟,但是仍然阻止了系统的完全自动化. 我试图避免使用第三方工具(如兑换),并且想知道是否有人找到了关闭自动解析的方法.

Now I sometimes get a message about allowing access to contacts. I have the email addresses for the recipients and don't need to access the contacts, but outlook autoresolve kicks in and then a pop up about allowing access to the contacts appears. This doesn't have the 5 second delay, but it still prevents the system being fully automated. I'm trying to avoid using 3rd party tools like redemption and I was wondering if anyone has found a way to turn autoresolve off.

我读过其他网站上的文章,建议关闭自动完成和自动名称检查功能,但是Outlook仍在尝试在发送邮件时解析地址.

I've read posts on other sites suggesting turning off autocomplete and automatic name checking, but outlook still attempts to resolve the address when the mail is sent.

很高兴收到任何指针.

编辑13年8月24日

我听说,如果您的Outlook 2007及更高版本以及具有Microsoft批准的病毒扫描程序的正确安装的系统,则不会看到此消息,但我无法控制用户计算机上程序的安装.

I have heard that if you outlook 2007 and above and a correctly installed system with a Microsoft approved virus scanner you will not see the message, but I don't have control over the installation of programs on the users machines.

我尝试过的代码包括

Function Mailit(byval sMessageTo as String, byval sSamplerCenter as String, byval sFileSpec as String)

Dim olApp As outlook.Application
Dim objMail As Outlook.MailItem
Dim blnOLOpen As Boolean

    On Error Resume Next
    Set olApp = GetObject(, "Outlook.Application")
    blnOLOpen = True
    On Error Goto 0

    If olApp Is Nothing Then
        Set olApp = CreateObject("Outlook.Application")
        blnOLOpen = False
    End If

    Set objMail = olApp.CreateItem(olMailItem)

    With objMail
       .To = sMessageTo
       .Subject = sSampleCenter
       .Attachments.Add sFileSpec
       .Send
    End With

这将导致有关病毒的警告消息,并导致5秒钟的等待时间,用户可以选择发送邮件.直到With objMail为止,我使用的sendkeys方法都是相同的,但随后执行以下操作:

This causes the warning message about viruses and causes a 5 second wait before a user can choose to send the mail. The sendkeys method I use is the same up to the With objMail but then does the following:

Dim myInspector As Outlook.Inspector


With objMail
.To = MessageTo
.Subject = SampleCenter
.Attachments.Add FileSpec
.Display
End With

Set myInspector = objMail.GetInspector
myInspector.Activate
SendKeys "%s", True

我还有一些代码来检查已发送文件夹中的项目数是否增加,如果没有,请等待/调用检查器和sendkeys函数. 这种方法不会导致警告,但是通常会导致一个对话框,询问用户是否希望允许访问其联系人.

I also have some code for checking that the number of items in the sent folder has increased and waiting/calling the inspector and sendkeys function if it hasn't. This method doesn't lead to the warning, but often results in a dialog box asking if the user wishes to allow access to their contacts.

推荐答案

在Outlook中:转到选项->电子邮件,然后禁用自动解析名称"复选框.

In Outlook: Go to Options -> E-Mail and disable the checkbox "Resolve names automatically".

这篇关于有没有办法防止在Outlook中自动解析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆