Get outlook mail filter with variables

Hi threre,

I’m struggling to get mails starting with a variable name.

For the variable word for example in sql it should be : like ‘word%’

I get a syntax error with the following code and I didn’t manage to fix it yet…

Here is my filter :

(not showing an error)

and after running :

Best regards,
Alexandre

@KurX - Is this same query posted here?

Indeed, I didn’t manage to delete the first topic

@KurX - I have added the variable as below and it worked…Please check…

“@SQL=”“http://schemas.microsoft.com/mapi/proptag/0x0037001f”" like ‘“&StrSubject &”%’ AND urn:schemas:httpmail:fromemail = ‘USPSInformeddelivery@Informeddelivery.usps.com’"

Thanks, it worked with this :

“@SQL=”“urn:schemas:httpmail:subject”" like ‘“&row(0).ToString &”%’ AND %last7days(urn:schemas:httpmail:datereceived)%"

Didn’t know that we can use & for variables.

Have a nice day !

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.