S
Shreekanth Murali
This is the macro to stop sending without a subject as well as to warn the user whn he sends to the distribution list that starts with "#"
However this code detects the email addresses in TO / CC as one single string.
For eg if i have
shreekanth Murali; #IN - distribution
then it detects "shreekanth murali; #in - distribution" and not warning the presence of a distributon list in TO field... Im a beginner please lemme know how can i do it
Private Sub Application_ItemSend(ByVal item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = item.Subject
If Len(Trim(strSubject)) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo Then
Cancel = True
End If
End If
Dim a
Dim b
a = Mid(item.To, 1, 1)
If a = "#" Then
Prompt$ = "You are about to send an email to the distribution list " & item.To
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Recipient is a distribution list") = vbNo Then
Cancel = True
End If
End If
End Sub
CSS Stylesheet Sampler Script
http://www.eggheadcafe.com/tutorial...0-64466ee722bc/css-stylesheet-sampler-sc.aspx
However this code detects the email addresses in TO / CC as one single string.
For eg if i have
shreekanth Murali; #IN - distribution
then it detects "shreekanth murali; #in - distribution" and not warning the presence of a distributon list in TO field... Im a beginner please lemme know how can i do it
Private Sub Application_ItemSend(ByVal item As Object, Cancel As Boolean)
Dim strSubject As String
strSubject = item.Subject
If Len(Trim(strSubject)) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo Then
Cancel = True
End If
End If
Dim a
Dim b
a = Mid(item.To, 1, 1)
If a = "#" Then
Prompt$ = "You are about to send an email to the distribution list " & item.To
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Recipient is a distribution list") = vbNo Then
Cancel = True
End If
End If
End Sub
CSS Stylesheet Sampler Script
http://www.eggheadcafe.com/tutorial...0-64466ee722bc/css-stylesheet-sampler-sc.aspx