以下 Outlook 宏运行良好,但我希望此 MsgBox 仅在以下情况下出现:主题类似于“费用到期百分比”或主题类似于“状态变更百分比”。这可能吗?@thims
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If MsgBox("Do you want to continue sending the mail?", vbOKCancel) <> vbOK Then
Cancel = True
End If
End Sub
答案1
将以下内容括在 If MsgBox ... 中:
If InStr(Item.Subject, "Fees Due") = 1 Or InStr(Item.Subject, "Status Change") = 1 Then
...
End If