Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有没有办法通过Outlook/Exchange以编程方式召回电子邮件?_Outlook_Exchange Server_Message - Fatal编程技术网

有没有办法通过Outlook/Exchange以编程方式召回电子邮件?

有没有办法通过Outlook/Exchange以编程方式召回电子邮件?,outlook,exchange-server,message,Outlook,Exchange Server,Message,有人知道这是否可能吗?我找不到关于这样做的更多信息,除了回忆发件人和收件人都必须使用Exchange并且收件人端的电子邮件必须未读之外。很少有需要这样做的情况,但即使如此,知道这一点还是很有用的 编辑 Outlook 2010是我正在使用的版本 用于“调用此消息”的FindControl ID是2511,因此您可以使用如下代码: Sub SendRecall() Dim obj As Object Dim msg As Outlook.mailItem Dim insp As O

有人知道这是否可能吗?我找不到关于这样做的更多信息,除了回忆发件人和收件人都必须使用Exchange并且收件人端的电子邮件必须未读之外。很少有需要这样做的情况,但即使如此,知道这一点还是很有用的

编辑

  • Outlook 2010是我正在使用的版本
用于“调用此消息”的FindControl ID是
2511
,因此您可以使用如下代码:

Sub SendRecall()

  Dim obj As Object
  Dim msg As Outlook.mailItem
  Dim insp As Outlook.Inspector

  ' get selected item
  Set obj = ActiveExplorer.Selection.item(1)

  If TypeName(obj) = "MailItem" Then
    Set msg = obj
    Set insp = msg.GetInspector
    ' execute the command button for "Recall this message"
    With insp
      .Display
      .CommandBars.FindControl(, 2511).Execute
      .Close olDiscard
    End With
  End If
End Sub

在Outlook 2003中工作,您没有发布您的版本,因此我不确定此解决方案是否适用于您。

开始查找的地方是Outlook MAPI,我承认我从未使用过它,但如果它与excel或office COM API类似,您应该能够执行在常规用户界面中通常可以执行的任何任务。我在Outlook 2010中,不过这还是有帮助的,谢谢!我相信CommandBars对象。我认为是贬值的新版本。