gpt4 book ai didi

Excel VBA @SQL 字符串过滤器

转载 作者:行者123 更新时间:2023-12-01 23:12:43 24 4
gpt4 key购买 nike

我一直在努力使这个声明成为 NOT 声明:

strfilter = "@SQL=" & Chr(34) & "urn:schemas:httpmail:subject" & Chr(34) & " like '%undeliverable%'"

此 strfilter 正在 items.restrict(strfilter) 中使用,因此显然它正在检查所有包含单词 undeliveable 的电子邮件。

我需要做的是转换此语句,以便排除所有主题包含单词“无法送达”的电子邮件。

我已经试过了,但它返回了一个解析错误:

"strFilter = "@SQL=" & Chr(34) & "urn:schemas:httpmail:subject" & Chr(34) & " NOT '%undeliverable%'"

提前致谢。

最佳答案

正确的语法是

Filter = "@SQL=" & " Not " & _
"urn:schemas:httpmail:subject" & "" & _
" Like '%undeliverable%'"

或者我更喜欢这个然后喜欢

strFilter = "@SQL=" & " Not " & _
"urn:schemas:httpmail:subject" & "" & _
" ci_phrasematch 'undeliverable'"

关于Excel VBA @SQL 字符串过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42696902/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com