2017-07-03 359 views
0

我正在嘗試在Outlook中進行高級搜索。我使用python和win32com來做到這一點,但這不應該成爲關鍵。展望高級搜索「urn:schemas:httpmail:datereceived」

到目前爲止,我的查詢工作,但它忽略我的日期過濾器。

這是我的過濾器:

"urn:schemas:mailheader:subject" like '%draft%' OR 
"urn:schemas:mailheader:subject" ci_phrasematch 'draft' OR 
"urn:schemas:httpmail:textdescription" like '%draft%' OR 
"urn:schemas:httpmail:textdescription" ci_phrasematch 'draft' AND 
"urn:schemas:httpmail:datereceived" > '01.06.2017 12:00 AM' 

有誰知道,我在做什麼錯?

親切的問候 本

回答

0

您的查詢,可以準確地工作的指示

我認爲你可能需要括號添加到您的邏輯聲明

查詢檢查日期

只有當
("urn:schemas:httpmail:textdescription" ci_phrasematch 'draft') = TRUE 

你很可能想要這樣:

( ("urn:schemas:mailheader:subject"  like   '%draft%') 
    OR ("urn:schemas:mailheader:subject"  ci_phrasematch 'draft' ) 
    OR ("urn:schemas:httpmail:textdescription" like   '%draft%') 
    OR ("urn:schemas:httpmail:textdescription" ci_phrasematch 'draft' ) 
    ) 
AND ("urn:schemas:httpmail:datereceived" > '01.06.2017 12:00 AM')