Restrict Outlook Items by Date

后端 未结 2 1671
广开言路
广开言路 2020-12-10 20:45

I have an Outlook macro that filters email objects by date and returns items based on an array.

The filter for today is the following:

sfilter = \"[R         


        
2条回答
  •  佛祖请我去吃肉
    2020-12-10 21:23

    Yesterday date could be filtered as below

    oOlResults.Restrict("@SQL=%yesterday(""urn:schemas:httpmail:datereceived"")%")
    

    The same for today or this month.

     oOlResults.Restrict("@SQL=%today(""urn:schemas:httpmail:datereceived"")%")
     oOlResults.Restrict("@SQL=%thismonth(""urn:schemas:httpmail:datereceived"")%")
    

    More info here

提交回复
热议问题