我正在構建一個代碼,用於在Outlook文件夾中執行搜索,並將這些項目的主體放在一起(僅爲一個項目構建歷史記錄)。Outlook VBA按日期排序
我正在使用Find方法執行搜索(不確定是否全部正確)。一旦我得到搜索結果,我會把它們放入一個數組中。
有沒有辦法按日期排序數組?調用find前
Dim olApp As Outlook.Application
Dim olNs As Outlook.Namespace
Dim olFldr As Outlook.MAPIFolder
Dim olItms As Outlook.Items
Dim olMail As Variant
Dim MyArray() As String
Set olApp = New Outlook.Application
Set olNs = olApp.GetNamespace(」MAPI」)
Set olFldr = olNs.GetDefaultFolder(olFolderInbox)
Set olItms = olFldr.Items
Set olMail = myTasks.Find("[Subject] = ""*140115LS*""")
If Not (olMail Is Nothing) Then
MyArray = olMail.Display
你的意思是'olItms.Find(...)'而不是'myTasks.Find(...)'? –
哦,是的,我幾分鐘前改變了變量! TKS! 關於如何按日期排序的想法? – AndroidDev