-1
你好,我有這個完美的代碼,我發現。它檢查新消息,並且只在日期和時間中添加自定義列。它非常適合按收到然後從收信人分組。Outlook VBA多個Acounts運行腳本
但它只適用於我的默認帳戶,可以使用多個帳戶嗎?
Private Sub Application_Quit()
Set myInbox = Nothing
End Sub
Private Sub Application_Startup()
Set myInbox = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub myInbox_ItemAdd(ByVal Item As Object)
Item.UserProperties.Add "DateReceived", olDateTime
Item.UserProperties.Item("DateReceived") = DateValue(Item.ReceivedTime)
Item.Save
End Sub
請參閱此處:http://stackoverflow.com/questions/33953386/vba-to-select-mailbox-if-an-account-has-multiple-mailboxs – OpiesDad
可能重複[獲取對其他收件箱的引用](http ://stackoverflow.com/questions/9076634/get-reference-to-additional-inbox) – niton
以及http://stackoverflow.com/questions/26274516/vba-get-email-from-non-default-inbox和http://stackoverflow.com/questions/6849068/get-inboxes-from-outlook – niton