Wednesday, December 23, 2009

Outlook: Subject Field and Deleted Items

Open outlook, press Alt+F11 and press Ctrl+R. Navigate to "ThisOutlookSession" and paste the below code, save (Ctrl+S) and close VB Editor.
Close and reopen outlook, enable macros.

Code

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
strSubject$ = Item.Subject
If Len(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

Note: once you do this, enable the macro in outlook by making the security to medium. Otherwise this will work only for the day you have done this.

Enabling macros.

Tools > Macro > Security > Security level > medium.

____________________________

Single click on Deleted items,

Then go to: Tools-) Recover Deleted Items.

__________________________