GetOutlookMailMessages - Filter on Multiple Columns


#1

Hi All,

I am trying to extract a list of Mail Messages into a collection variable, for a particular date with a particular subject line from my inbox.

I am able to filter on Subject line without any issues, but not able to figure out as to how do I specify the received date condition.

Kindly help me on specifying the 2nd filter criteria…!!

Thanks,
Ram


#2

You can’t filter with two criteria. You may filter on one, like the Date, then use a For Each to further eliminate messages with undesirable Subject.

If someone figured out a way, please share!


#3

On mobile now so hard to find anything, but search the forums for Outlook DASL. There are examples.


#4

While looping thru each email message, we can use MailMessage.Headers.Get(“Date”) for capturing the received date information of the message object and then we can capture the required messages into a collection.

Thanks for your inputs


#5

Glad you got it to work! That’s how I’ve done it with my projects in the past as well.