OL2003\Prompt for Subject Heading

  • Thread starter Thread starter Stainer, Chris
  • Start date Start date
S

Stainer, Chris

Peeps,

Please can someone help!

I would like to create a VBA macro which prompts the user to enter a subject
heading if left blank when sending a message within Outlook 2003.

Has anyone achieved this, and if so, could they share the code used?

Regards,
 
You can do it with a little VBA code:

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
 
Back
Top