問題:使用vbscript處理傳入電子郵件。使用vbscript處理傳入電子郵件
的Outlook版本:Outlook 2000中
說明:我不能使用VBA這個,因爲我相信Outlook 2000中不會讓您從規則嚮導VBA腳本,因此我必須使用Run a Program | VBScript
方法。
我所知道的:我知道如何從VBA處理電子郵件這樣
Sub Sample(MyMail As MailItem)
Dim strID As String, olNS As Outlook.NameSpace
Dim olMail As Outlook.MailItem
strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set olMail = olNS.GetItemFromID(strID)
'~~> Rest of the code
Set olMail = Nothing
Set olNS = Nothing
End Sub
我也知道如何在這已經在收件箱中的電子郵件運行VBScript。要在OL2000中運行vbscript,您必須使用Run A Program
並將其指向vbs文件。 Run A Script
在OL2000中不可用。我不知道:這是我需要幫助的地方。如何獲取尚未打到VBS中郵件收件箱的郵件對象。一旦我得到了對象,我就可以完成其餘的必要操作。
對不起,我很困惑:'如果沒有到達收件箱,郵件對象沒有打到郵件收件箱中,就Outlook而言,它不存在。 – JimmyPena 2012-07-13 17:54:57
@bonCodigo:只需把我的電子郵件在這裏http://www.siddharthrout.com/contact/ – 2013-02-27 12:33:43