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

时间:2012-06-25 20:06:57

标签: outlook exchange-server message

有人知道这是否可行?除了甚至回忆起发送者和放大器的消息之外,我看不到有关这样做的更多信息。接收方必须使用Exchange,并且必须在接收方端读取电子邮件。很少有这种情况需要这样做,但即使如此,知道也是有用的。

修改

  • Outlook 2010是我正在使用的版本。

1 个答案:

答案 0 :(得分:3)

“召回此消息”的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中运行,您没有发布您的版本,因此我不确定此解决方案是否适合您。

相关问题