[How-To] Missed Outlook Attachment,get warned before its too late

Thursday, 16 October 2008, 23:21 | How-To, Microsoft, Microsoft Outlook, Tutorials | 8 Comments | Read 194 Times
by Vaibhav Pandey

Gmail labs has an interesting feature which warns you if you miss to attach an attachment when sending the mail. A similar feature can be achieved in Microsoft Outlook as well, using Visual Basic scripting. 

For those of you who wish to achieve the same in Outlook, here is the step by step process.

1.) Ensure that Macros are enabled for your Microsoft Office Outlook. Macros don’t work with Microsoft Outlook Express, therefore this setup cannot be achieved with Microsoft Outlook Express.

2.) Ensure that your security level is set to Medium. You can set the security level by clicking on Tools –> Macro –> Security. Set the desired level to Medium.

3.) Traverse through Tools –> Macro –> Visual Basic Editor ( Or press ALT + F11)

4.) Expand Project 1 by clicking on the + sign.

Project Edition in Outlook

Project Edition in Outlook

5.) Expand Microsoft Office Outlook Objects.

6.) Double click ThisOutlookSession.

Code for Attachment Detection

Code for Attachment Detection

7.) Copy paste the following code. 


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

Dim lngres As Long

If InStr(1, Item.Body, "attach") <> 0 Then

If Item.Attachments.Count = 0 Then

lngres = MsgBox(" Found 'Attach' in message, but no attachment found - send anyway?", _

vbYesNo + vbDefaultButton2 + vbQuestion, "You asked me to warn you...")

If lngres = vbNo Then Cancel = True

End If

End If

End Sub

8.) The above code looks for the term “attach” ( without quotes) in the message body. If you send mails in your local language which is other than English, replace the word “attach” to the word you would be interested in searching for. This will make the code look for that particular word.

9.) Once the code is pasted, click on Save and then Exit.

Detecting attachments in Outlook

Detecting attachments in Outlook

10.) From now on, if you create any mail with Attach in the mail body and try sending it without attaching any file, you will get an alert.

Enjoy no more missing attachments in your important mails. Hope this post helps.

Also read[How-To] Recover lost Outlook PST Password

Kingsoft Office 2007: Microsoft Office comes free

How-To: Display two time zones in Microsoft Outlook

Recovering ‘permanently’ deleted email in Microsoft Outlook 2003

Microsoft Outlook: Creating an Appointment From a Mail

You can also follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

Cheers

Vaibhav

 

 

 

 

 




Follow me on Twitter at @vaibhav1981
Tagged with: , , , , , , ,
Technofriends on Facebook