Archive for the ‘Outlook’ Category

Text Comparison: Option Compare Text

Posted: July 12, 2013 by kulshresthazone in Excel, Outlook, Powerpoint, VBA
Tags: ,

If we compare text in VBA Code then “B” is not equal to “b” since there ASCII codes for both these characters are different. However we can force Excel code to compare text on the basis of  Text not on their Binary values.
Make use of  Option Compare Text on the very First line of the Code module. It will force VBA to compare Text in Text mode not in Binary mode. By Default Text comparison is done in Binary mode.

If we don’t use Option Compare Text then
If we make use of Option Compare Text then

Happy Coding…


We send so many mails everyday that sometimes we forget to attach files or add subject line. Here we have a macro that solves both the issues.It prompts the user if:

  1. subject line is missing or
  2. there are words like enclosedattached and PFA in message body but attachment is missing

To add this macro in your outlook go to Tools -> Macro -> Visual Basic Editor or just press Alt+F11 and paste the macro in ThisOutlookSession.

Subject Line or Attachment Missing_1

VBA Editor in Outlook