How do you require a subject on an e-mail?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to prevent sending an e-mail in OUTLOOK without the subject
field completed? There should be a way to set a warning or message that the
subject field is blank.

Yahoo!s e-mail system will automatically inform you if the subject field is
blank and ask if you want to send the message anyway.

Outlook should be able to do this.

Thanks.
 
Write code for the Application_ItemSend event handler, e.g.:

Private Sub Application_ItemSend _
(ByVal Item As Object, Cancel As Boolean)
If Item.Subject = "" Then
Cancel = True
MsgBox "Please fill in the subject before sending.", _
vbExclamation, "Missing Subject"
End If
End Sub

For a more elaborate version that also checks for expected attachments, see
http://www.outlookcode.com/codedetail.aspx?id=553

And see http://www.outlookcode.com/d/vbabasics.htm if you're just getting started with Outlook VBA.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top