Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook automation restrict date search
Message
From
23/05/2016 14:59:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Outlook automation restrict date search
Miscellaneous
Thread ID:
01636716
Message ID:
01636716
Views:
68
thanks to Tore for folder number. I now need to restrict my search in the junk folder to the past 90 days.
I tried to model on my present 'unread' filter (which Tamar sent me) but the date()-90 is not a match to the SentOn property of the emails.
I am clearly missing something. Any suggestions?

tnks
k
#DEFINE olFolderJunk 23

oOutlook = CREATEOBJECT("Outlook.Application")
oNS = oOutlook.getnamespace("MAPI")
oJunkMail = oNS.GetDefaultFolder(olFolderJunk )
oMsgs = oJunkMail.Items
** loUnread = oMsgs.Restrict("[Unread] = true")

loRecent = oMsgs.Restrict([SentOn]>Date()-90)  && ???
Next
Reply
Map
View

Click here to load this message in the networking platform