how to set outlook 2003to cannot send mail without subject,attachm

  • Thread starter Thread starter venu
  • Start date Start date
Insert the following code into your ThisOutlookSession code window.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim mi As MailItem
Set mi = Item
If mi.Subject = "" Or mi.Attachments.Count = 0 Then
Cancel = True
End If
set mi=Nothing
End Sub
 
Thanks a lot for your responce its working.

Alan Moseley said:
Insert the following code into your ThisOutlookSession code window.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim mi As MailItem
Set mi = Item
If mi.Subject = "" Or mi.Attachments.Count = 0 Then
Cancel = True
End If
set mi=Nothing
End Sub

--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.
 
Back
Top