有誰知道這是可能的嗎?我看不到發現許多信息,除了甚至想起發件人&接收者必須使用Exchange並且電子郵件必須在接收者端未讀的消息之外。很少有這樣的情況需要完成,但即使如此,知道它也是有用的。有沒有辦法通過Outlook/Exchange編程調用電子郵件?
編輯
- 展望2010年是我使用的版本。
有誰知道這是可能的嗎?我看不到發現許多信息,除了甚至想起發件人&接收者必須使用Exchange並且電子郵件必須在接收者端未讀的消息之外。很少有這樣的情況需要完成,但即使如此,知道它也是有用的。有沒有辦法通過Outlook/Exchange編程調用電子郵件?
編輯
的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 2010中,但是這對我們很有幫助,謝謝! –
我相信CommandBars對象[已在Outlook 2010中被棄用](http://stackoverflow.com/a/11004739/190829)。 – JimmyPena
我認爲[this](http://msdn.microsoft.com/zh-cn/library/ff864119)是折舊的新版本。 –
一個地方開始尋找將是Outlook MAPI http://msdn.microsoft.com/en-us/library/cc765775.aspx我承認我從來沒有使用它,但如果它是像Excel或任何東西辦公室的COM API,你應該能夠執行任何通常在常規用戶界面中執行的任務。 –
Outlook版本? – JimmyPena