【问题标题】:Supress Outlook pop-up allow access in R抑制 Outlook 弹出窗口允许在 R 中访问
【发布时间】:2020-07-06 00:29:19
【问题描述】:

我在 R 中编写了一个脚本,该脚本通过我在 Outlook 中的邮件来搜索确定的电子邮件。问题是每次脚本尝试访问我的电子邮件时,都会弹出一个窗口并请求许可。该脚本按预期工作,但进程减慢,因为我每次都必须在那里单击“允许”。 我已经读到可以允许程序在 Trusct Center 选项中进入我的 Outlook,但 Windows 版本太旧,无法通过这种方式修复。此外,由于这是一个共享服务器,我没有管理员访问权限,因此无法进行重大更改。 我读过其他类似的问题,但在 R 中没有,比如这个[Suppress Outlook pop-up allow access 或这个[How to supress the outlook pop up message while sending mails in PB8。 这是我的脚本:

library(RDCOMClient)
library(stringr)

#Folder in OutLook where to look for the emails
folderName = "Specific folder"

OutApp <- COMCreate("Outlook.Application")
outlookNameSpace = OutApp$GetNameSpace("MAPI")

folder <- outlookNameSpace$Folders(1)$Folders(folderName)
folder$Name(1)
emails <- folder$Items

for (i in 1:emails()$Count()){
  subject <- emails(i)$Subject() #Get the subject of the email

  #If the subject of the email has an specific string print the body of the message
  if (grepl("Subject to look for", subject)== TRUE){
    body <- emails(i)$Body() # Here asks for permission
    print(body)
  }
}

有没有办法嵌入一段代码来避免这个弹出窗口或自动“点击”允许?

【问题讨论】:

    标签: r ms-access outlook


    【解决方案1】:

    看起来您在 Outlook 中遇到了标准的安全提示。有可能的路线,你可以去:

    1. 使用 Outlook 所基于的低级代码 - 扩展 MAPI 或围绕此 API 的任何其他第三方包装器,例如 Redemption。

    2. 使用专为在 Outlook 中关闭此类安全触发器而设计的第三方组件 - Security Manager for Microsoft Outlook

    3. 设置组策略以避免此类触发器。

    4. 在系统上设置有效的防病毒软件。

    【讨论】:

    • 感谢您的信息。当我在共享服务器上工作时,我想避免安装程序或防病毒软件,因为它们可能会干扰其他人的项目。我想我会尝试你的第一个建议,但我必须研究它。我还是个编程新手
    猜你喜欢
    • 2016-07-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多