September 7, 2010

Outlook Subject Reminder!!

Sent a mail without subject in outlook and feeling bad later??????


Just follow below steps to overcome this.


1.       Open Outlook.

2.       Navigate Tools->Macro->Visual Basic Editor (Alt+11)

3.       In the left pane, expand Project1->Microsoft Outlook Objects

4.       Double click on “ThisOutlookSession”

5.       In the right pane copy below code and save it.


Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim strSubject As String

strSubject = Item.Subject

If Len(Trim(strSubject)) = 0 Then

Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"

If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo Then

Cancel = True

End If

End If

End Sub


6.       Navigate Tools->Macro->Security

7.       Select either “Warnings for all macros” or “No Security Check for macros” (1st option will ask enable macro while starting Outlook where 2nd option will directly enable without your inputs)

8.       Click on OK.

9.       Now try to send a mail without subject……It will remained you.

No comments:

Post a Comment