Thursday, January 20, 2011

Check for Attachment and Empty Subject Line in MS Outlook

Hi,


By mistake, many of us send out emails without a subject or forget attaching when we should have. Following is the code which will help you check for both of these. It is very simple and straightforward. All you need to do is follow the following steps:

1. Open outlook and press Alt + F11. This will open the Microsoft Visual Basic editor.
2. On the left side you would see Project Pane. Click on Project 1 > Microsoft Office Outlook > This Outlook Session.
3. On the right side just copy paste the following VBA code and then press Ctrl + S to save the code and you are done:

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
If InStr(1, Item.Body, "attach", vbTextCompare) > 0 Then
Prompt$ = "Seems you have forgotten to attach a document. Do you want to send an email anyways?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Attachment") = vbNo Then
Cancel = True
End If
End If
End Sub


Sunday, November 02, 2008

Ramta Jogi :)



Last six months have been pretty fast and hectic. Thanks to the nature of my work have been to many places in somewhat short time. Been to all the following places:

  1. Amsterdam
  2. Rotterdam
  3. Utrecht
  4. NY
  5. NJ
  6. Houston
  7. Chicago
  8. Traverse City
  9. BattleCreek
  10. Singapore
The airport transits if you may :)
  1. Atlanta,US
  2. Vienna, Austria
  3. London, UK
  4. Frankfurt, Germany
  5. Grand Rapids, US

Wednesday, June 25, 2008

Sunday, April 13, 2008

Funny Quotes and One liners - II

  1. Flying is learning how to throw yourself at the ground and miss.
  2. He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
  3. I love deadlines. I like the whooshing sound they make as they fly by.
  4. I'm spending a year dead for tax reasons.
  5. I like getting married, but I don't like being married.
  6. Never let a fool kiss you, or a kiss fool you.
  7. Smack your child every day. If you don't know why - he does.
  8. The difference between playing the stock market and the horses is that one of the horses must win.
  9. The length of a film should be directly related to the endurance of the human bladder.
  10. The safe way to double your money is to fold it over once and put it in your pocket.
  11. Algebra was easy for the Romans because "X" was always 10.

Tuesday, February 05, 2008

Funny Quotes and One liners

Funny one liners and quotes have always attracted my attention. I enjoy them a lot. The ones in the top drawer are those which take a second to understand and then u look back and enjoy the kick. So here is the list of some which I like most. I have taken the liberty to rip them off the status messages of frens and various websites. It will be updated most regularly. So keep watching the space.

  1. All those who believe in telekinesis, raise my hand.
  2. Money can't buy you love but it significantly increases your bargaining position.
  3. We could all take a lesson from the weather. It pays no attention to criticism.
  4. My work is like rocket science.. It speeds up with fire up my ass.
  5. If love is blind, why is lingerie so popular?
  6. Money doesn't make you happy. I now have $50 million but I was just as happy when I had $48 million.
  7. You don't know a woman till you've met her in court.
  8. My wife is a sex object - every time I ask for sex, she objects.
  9. Man has will, but woman has her way.
  10. A girl phoned me the other day and said ... Come on over, there's nobody home. I went over. Nobody was home.
  11. My first experience with oral contraception - I asked a girl to go to bed with me, she said 'no'.
  12. Life is a sexually transmitted disease and the mortality rate is one hundred percent.
  13. I think the hardest part about claiming a black hole is figuring out where to stick the flag.
  14. When two hearts race, both win.
  15. We are here on earth to do good for others. What the others are here for, I don't know.
  16. Honesty is the key to a relationship. If you can fake that, you're in.
  17. If your parents never had children, chances are you won't either.
  18. Time is a great healer, but a terrible beautician.
  19. The early bird may get the worm, but the second mouse gets the cheese.
  20. Atheism is a non-prophet organization.
  21. Despite the cost of living, have you noticed how popular it remains?
  22. I just got lost in thought, and it was unfamiliar territory.
  23. Xerox and Wurlitzer will merge to market reproductive organs.
  24. Gargling is a good way to see if your throat leaks.
  25. Love at first sight - saves time.