Outlook脚本来检查正文中的文本 [英] Outlook Script To Check for Text In Body

查看:70
本文介绍了Outlook脚本来检查正文中的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用的脚本.我需要做的一部分工作是查找嵌入在电子邮件中的链接,并在找到该脚本时跳过该脚本.但是,它不起作用:

I have a script we use. What I need a portion of this to do is look for a link embedded in the e-mail and skip the script if it finds it. However, it's not working:

If Item.Class = "43" Then
If InStr(Item.Body, "https://mywebsite.local/TEMP*") = 1 Then
GoTo NonEmailError
End If

因此在TEMP之后实际上是一些随机字符.上面的通配符似乎没有作用.有没有办法在这种类型的语句中使用通配符?我在这里可以做什么?

So after the TEMP is actually some random characters. It doesn't appear the wild card works in the above. Is there a way to use a wildcard in this type of statement? What can I do here?

推荐答案

实际上,已经评论过,我怀疑您的问题实际上是您正在测试InStr返回1.这可能会解决您的问题:

Actually, having commented already, I suspect your problem is in fact that you're testing that InStr returns 1. This will probably fix your problem:

If InStr(Item.Body, "https://mywebsite.local/TEMP") > 0 Then

您仍然需要删除通配符.

you'll still need to remove the wildcard.

这篇关于Outlook脚本来检查正文中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆