0
當我偵聽每個商店默認文件夾的Item_add事件時,它們從不觸發。這怎麼可能?Outlook商店事件永不觸發
'doesnt work:
For Each st As Outlook.Store In Application.Session.Stores
AddHandler st.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail)
.Items.ItemAdd, AddressOf sentmail
AddHandler st.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail) _
.Items.ItemAdd, Function() MsgBox(55)
Next
'works
AddHandler Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail) _
.Items.ItemAdd, AddressOf sentmail