sharon ann
09-24-2007, 11:22 AM
Hi
The following code was found at SearchExchange.com and was coded apparently by Sue Mosher MVP. It forces an Outlook user to fill in the subject line before sending an Email.
This is the code - it works with or without the line "Dim lngRes As Long" - to be honest I'm not sure what that line of code is doing there...
Private Sub Application_ItemSend _
(ByVal Item As Object, Cancel As Boolean)
Dim strMessage As String
Dim lngRes As Long
if Item.Subject = "" Then
Cancel = True
strMessage = "Please fill in the subject before sending."
MsgBox strMessage, _
vbExclamtion + vbSystemModal, "Missing Subject"
Item.Display
End if
End sub
Can anyone enlighten me - is it a mistake, does it mean something or is it doing something.
Thanks
(ps I will post the http address later on in case anyone is interested).
The following code was found at SearchExchange.com and was coded apparently by Sue Mosher MVP. It forces an Outlook user to fill in the subject line before sending an Email.
This is the code - it works with or without the line "Dim lngRes As Long" - to be honest I'm not sure what that line of code is doing there...
Private Sub Application_ItemSend _
(ByVal Item As Object, Cancel As Boolean)
Dim strMessage As String
Dim lngRes As Long
if Item.Subject = "" Then
Cancel = True
strMessage = "Please fill in the subject before sending."
MsgBox strMessage, _
vbExclamtion + vbSystemModal, "Missing Subject"
Item.Display
End if
End sub
Can anyone enlighten me - is it a mistake, does it mean something or is it doing something.
Thanks
(ps I will post the http address later on in case anyone is interested).