I am building a code that does a search in a Outlook folder and put the body of the items together in just one item (to build a history for that case).
I am performing the search using the Find method (not sure if all correct). Once I get the search results, I'll put them in an array.
Is there a way to sort the array by date? I keep getting an error with code below:
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 = olItms.Find("[Subject] = ""*140115LS*""") If Not (olMail Is Nothing) Then MyArray = olMail.Display