Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = Item.Subject
If (Trim(strSubject)) Like "FOR REVIEW*" Then
Prompt$ = "Please do xyz"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Review Subject Line") = vbNo Then
Cancel = True
End If
End If
End Sub
Need to find FOR REVIEW anywhere in the subject .
note: * FOR REVIEW * doesn't works !!
Need to change the button NO to 'Go back'. replacing No with Goback didn't work !!
try:
"*" "FOR REVIEW" "*"
instead of
"FOR REVIEW*"
Changed
strSubject = Item.Subject
If (Trim(strSubject)) Like "FOR REVIEW*" Then
To
Item.Subject LIKE "*For Review*"
So it finds the words.I removed TRIM function.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.