Outlook Warning if Email has No Subject?

V

Victor

Is there a way for Outlook XP to issue a warning if I try to send an email with no
subject?

Even a plug-in or a macro would be great!

Thanks,

Vic
 
R

Roady [MVP]

Macro it is;

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If TypeName(Item) <> "MailItem" Then Exit Sub

'CHECK FOR BLANK SUBJECT LINE
If Item.Subject = "" Then
Cancel = MsgBox("This message does not have a subject." & vbNewLine & _
"Do you wish to continue sending anyway?", _
vbYesNo + vbExclamation, "No Subject") = vbNo
End If
End Sub

--
Robert Sparnaaij [MVP-Outlook]
Coauthor, Configuring Microsoft Outlook 2003


-----
Is there a way for Outlook XP to issue a warning if I try to send an email
with no
subject?

Even a plug-in or a macro would be great!

Thanks,

Vic
 
G

Guest

Sorry, I found this function useful but I have no idea of how to create and
run Macro in my Outlook. Could you pls advise the steps for me to follow so.

Many thanks.
Korsiu
 
S

Sue Mosher [MVP-Outlook]

See http://www.outlookcode.com/d/vbabasics.htm for Outlook VBA basics.

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

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


Korsiu said:
Sorry, I found this function useful but I have no idea of how to create and
run Macro in my Outlook. Could you pls advise the steps for me to follow so.

Many thanks.
Korsiu

Roady said:
Macro it is;

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If TypeName(Item) <> "MailItem" Then Exit Sub

'CHECK FOR BLANK SUBJECT LINE
If Item.Subject = "" Then
Cancel = MsgBox("This message does not have a subject." & vbNewLine & _
"Do you wish to continue sending anyway?", _
vbYesNo + vbExclamation, "No Subject") = vbNo
End If
End Sub

--
Robert Sparnaaij [MVP-Outlook]
Coauthor, Configuring Microsoft Outlook 2003


-----
Is there a way for Outlook XP to issue a warning if I try to send an email
with no
subject?

Even a plug-in or a macro would be great!

Thanks,

Vic
 
G

Guest

Many Thanks, Sue. I've got it.

Sue Mosher said:
See http://www.outlookcode.com/d/vbabasics.htm for Outlook VBA basics.

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

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


Korsiu said:
Sorry, I found this function useful but I have no idea of how to create and
run Macro in my Outlook. Could you pls advise the steps for me to follow so.

Many thanks.
Korsiu

Roady said:
Macro it is;

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If TypeName(Item) <> "MailItem" Then Exit Sub

'CHECK FOR BLANK SUBJECT LINE
If Item.Subject = "" Then
Cancel = MsgBox("This message does not have a subject." & vbNewLine & _
"Do you wish to continue sending anyway?", _
vbYesNo + vbExclamation, "No Subject") = vbNo
End If
End Sub

--
Robert Sparnaaij [MVP-Outlook]
Coauthor, Configuring Microsoft Outlook 2003
http://www.howto-outlook.com/
Outlook FAQ, HowTo, Downloads, Add-Ins and more

-----
Is there a way for Outlook XP to issue a warning if I try to send an email
with no
subject?

Even a plug-in or a macro would be great!

Thanks,

Vic
 
R

Roady [MVP]

Oh look, we've had this conversation before, haha ;-)
http://office-outlook.com/outlook-forum/index.php/m/43367/

--
Robert Sparnaaij [MVP-Outlook]
Coauthor, Configuring Microsoft Outlook 2003


-----
See http://www.outlookcode.com/d/vbabasics.htm for Outlook VBA basics.

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

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


Korsiu said:
Sorry, I found this function useful but I have no idea of how to create
and
run Macro in my Outlook. Could you pls advise the steps for me to follow
so.

Many thanks.
Korsiu

Roady said:
Macro it is;

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If TypeName(Item) <> "MailItem" Then Exit Sub

'CHECK FOR BLANK SUBJECT LINE
If Item.Subject = "" Then
Cancel = MsgBox("This message does not have a subject." & vbNewLine & _
"Do you wish to continue sending anyway?", _
vbYesNo + vbExclamation, "No Subject") = vbNo
End If
End Sub

--
Robert Sparnaaij [MVP-Outlook]
Coauthor, Configuring Microsoft Outlook 2003


-----
Is there a way for Outlook XP to issue a warning if I try to send an
email
with no
subject?

Even a plug-in or a macro would be great!

Thanks,

Vic
 

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

Top