Friday 2 May 2008

MSOutlook Alert

How to make outlook alert before sending mail with no subject

Alerting can be made only as a hotfix by writing some macro

No option available on Outlook to enable this feature

Steps:-

1) Open outlook

2) Press Alt+F11 (VB Editor will be opened)

3) Expand the "Project1"

4) Expand "Microsoft Office Outlook"

5) double click on "ThisOutlookSession"

6) Now paste the following code


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


7) Save and close VB Editor

8) Close Outlook and when asked to save the macro in "ThisOutlookSession" select "yes".

9) Now open outlook and when asked to enable macros select "Yes"

Problem solved

1 comment:

Alex said...

I have many interesting softwares on my computer. But no one of theirs could'nt aid me with my outlook problem. Only by a lucky chance I knew about one tool, which finished my troubles and I became calm. To my mind it has very useful resources for working out other difficult situations - ost pst conversion tool.