tags:

views:

577

answers:

4

I always forget to write subject in email, so I want make the subject field compulsory. Can you help me please?

+2  A: 
Private Sub Application_ItemSend(ByVal Item As Object, ByRef Cancel As Boolean)

  If Item.Subject = "" Then
    Item.Subject = InputBox("Please do not always forget the subject!")
  End If

  If Item.Subject = "" Then
    MsgBox "Won't send this without a subject."
    Cancel = True
  End If
End Sub
Tomalak
A: 
Do While Item.Subject = ""
Item.Subject = InputBox("..")
Loop
abatishchev
A: 

I have a similar routine which just checks if I mention the word attachment, and will prompt me if I want to cancel the send, and I have to put in the line:

Item.Display

so that I can go add the attachment. This way you can just prompt with a messagebox saying to add the subject...

Jon Fournier
A: 

but this solution works only when Macro Security is enabled. Is there any other solution which is independant from above paramter.

YSReddy