Tuesday, September 05, 2006

HOW TO: Not forget attachment or subject line using Outlook macro

Background

Following VBA code will remind you if you are sending an email with empty subject line, or when you forget the attachment. It checks mail body for word "attach" and then confirms if something is really attached. If you attachment is missing, it will pop-up a dialog box.

The setup

  1. In your Outlook 2003, invoke Visual Basic Editor, either by pressing Alt+F11, or navigating the menu as "Tools->Macro->Visual Basic Editor"
  2. In the Left hand side "Project" panel, make sure entry named "ThisOutlookSession" is highlighted.
  3. Copy paste the code given below in the Right hand side Panel.
  4. Exit out of VB Editor by either Alt+Q or by navigating the menu item File->Close.
Security
  1. Make sure that the security is set to "High" (Tools->Macro->Security)
  2. The changes we made will NOT work with High security, so we need to "certify" our code, so that it always works.
  3. Invoke "selfcert.exe" from "C:\Program Files\Microsoft Office\OFFICE11\SELFCERT.EXE"
  4. In the dialog that pops up, Type your name.
  5. Go back to Visual Basic Editor (Alt+F11 from Outlook)
  6. Navigate to Tools->Digital Signature.
  7. Click "Choose"
  8. Select your name, Click "OK"
  9. Click "OK" to come out of "Digital Signature" dialog.
  10. Exit out of VB Editor (Alt+Q)
Activating the Macro
  1. Restart your Outlook
  2. When asked about macros, select "Enable Macros"
Test
  1. Try sending an email with empty subject to yourself, to test if everything works.
  2. Type "attach" or "attached" in email body and send email to yourself without actually attaching any file.
.. finally "The Code"

Please refer to my earlier post here

Read more!

Tuesday, August 29, 2006

My comment Featured on Lifehacker

My comment related to trying IE7 standalone without breaking your existing IE setup, was selected for "Around The Water Cooler: Best comment thread roundup"

Here is my comment:

Couple of ways to try IE7 without wrecking your system. You'll be able to continue with your tried-and-tested IE6 for some of the sites which won't work with Firefox.

1. IE7 standalone

2. Altiris Software virtualization Download link to zip file, at the beginning of the article.

Read more!

Thursday, July 20, 2006

Outlook Macro source code

This post is created only for the code, so that I can keep updating it.
The instructions are in other posts.
I do not take credit for this code. Original code for Attachment reminder available here. I merely combined this with Reminder for missing subject. Similar code is available easily just by Googling.

*Update: Outlook counts files used in Signatures as attachments. see here.


Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim strSubject As String
Dim m As Variant
Dim strBody As String
Dim intIn As Integer, intAttachCount As Integer
Dim x As Integer

intAttachCount = 0

strBody = LCase(Item.Body)
intIn = InStr(1, strBody, "original message")
If intIn = 0 Then
intIn = Len(strBody)
intIn = InStr(1, Left(strBody, intIn), "attach")
If intIn > 0 Then

For x = 1 To Item.Attachments.Count
If LCase(Item.Attachments.Item(x).DisplayName) <> "picture (metafile)" Then
intAttachCount = intAttachCount + 1
End If
Next

If intAttachCount = 0 Then

m = MsgBox("It appears that you mean to send an attachment," & vbCrLf & "but there is no attachment to this message." & vbCrLf & vbCrLf & "Do you still want to send?", vbQuestion + vbYesNo + vbMsgBoxSetForeground)

If m = vbNo Then
Cancel = True
Exit Sub
End If
End If
End If
End If

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


Read more!

Tuesday, July 18, 2006

Ginko: Quick note taking with Outlook

I came across this really neat tool for quick note taking. It is called Ginko (after Ginko Biloba which is memory enhancer herb)

I had downloaded it earlier, gave it a try and realized that I am not using it the way it ti to be used, so I stopped using it for few months. Then after a while I really need to create a @TODO folder in Outlook so that I can track my action items. I started moving the emails which required some action from my side into this folder. But quickly I realized that there are action items originating outside the emails. I had thought of writing an email and send it to myself,that is when I remembered that I know of a tool which does exactly same thing.

But I couldn't remember the name of the application, so I searched my machine using X1, trusty desktop search engine. After couple of combinations of search terms, I was able to find it in my download folder. Rest was easy. I had used it earlier, so I knew I needed to edit the .hta file to point it to correct Folders. As soon as I was done, I was able to jot down the next TODO item. It was that easy.

More about this tool at the author's page here.

Read more!

Tuesday, June 13, 2006

Productivity enhancing Software - Part III

This is part III of the series. Today I'll cover following tools
  1. Gvim : Editor of the Beast
  2. EverNote : Keep all your notes in one place

Vim: Editor of the Beast
I've been using vi since last 10 years, naturally vim was an easy option when I was looking for vi-clone on windows. vi clone is available on windows via cygwin. If all you want is an editor, cygwin is too bulky. So I opted for Vim. I started using Vim with version 5.7. Earlier when working on MS platform, I've also tried Vim and Visual studio integration. It is awkward at best. My usage of Vim continued. It just made me far more productive than Notepad. I used SciTE for longest time and then came vim 7.

The most important feature for me has to be integrated spell checker. With this option, I believe vim is complete as general purpose editor. For me it was always the editor meant for programmers (with syntax highlighting and all). It definitely improves your productivity as a programmer. Coming back to spell checker, I can now use vim as my only editor. Earlier I used to type us the text in Vim an then copy/paste into some other program with built-in spell checker, make the corrections. But problem was that I had to do this several times, as I edit and re-edit the contents. It was inconvenient. But now I'm writing this entry in Vim 7 and fixing the spelling errors, on the go, as Vim points out the errors visually.

I had never looked beyond programmer-friendly features of Vim till Vim7, but now I have started looking at all the features again. I like working with tabs (Firefox being my choice for the browser). Besides multiple documents in Tabs, Vim provides the capability to split the windows vertically or horizontally, so that you can compare two documents or work on multiple documents, while you cycle thru them using Ctrl+Tab.

It lets you convert the text into HTML. Now, it may not be apparent how useful this is, but I used to use this to convert the .diff files into color coded HTML files when sending the review notice. It is very useful for the reviewers to visually see the difference.

If all the inbuilt functionality is not enough, there are Vim scripts. The scripts will let you extend the functionality.

EverNote :Keep all your notes in one place
One of my colleagues is a die-hard MS OneNote Fan. He recommended me to use MS OneNote, and I tried the trial version for a while. To be frank, it was bit of a hassle to use OneNote all the time. So I stopped using it. I wasn't impressed much. I continued with combination of text files, notes
written on paper, OutLook notes etc. It was not pretty. Then I got a laptop. It was easier to carry it with me for all the meetings, so more and more of my note taking started happening online. That is when I realized that I really need to get my notes organized. Around same time I came across EverNote as a free alternative to MS OneNote. Since it was free, there was no risk in trying. But I was really impressed with the ease of use.

Here are some of the important features I like the most:
Endless Tape: This was lacking with MS OneNote, and what made it difficult to use. This interface mimics the real paper notebook.
Categories: You see the categories on the left panel, and drag the categories on the note. With MSON, you had to decide on the category first, and what if particular note belonged to multiple category ?
Search: This has be integral part of any note taking software. Evernote does a good job of it. I never used MSON long enough to know how well the search works there. EN has a cool feature called keyword search, which is similar to Outlook's Search Folder concept. Let the note be anywhere, with keyword search, it shows up here.

I know for sure that my meetings have been far more productive after I started using EverNote on my laptop. I can quickly find the previous meeting minutes notes and it is easy to follow up.


To be continued ....

Part I
Part II



Read more!

Monday, May 29, 2006

Productivity enhancing Software - Part II

This is Part II of the series. Today I'll cover following utilities:
  1. WordWeb: Offline dictionary
  2. SlickRun: The magical floating 'Run' bar
WordWeb: Offline dictionary
English is not my native language, but I've gotten better with it over a period of time. My 3.5 yrs in US may have helped a lot in that respect. But I still I am unaware of a LOT of new words, that I come across. I think wordweb is a very good way to help with this problem.
You can highlight a word in ANY application and then invoke WordWeb using a hotkey. Default is Ctrl-Alt-W, but you can define other is you want. It also shows the phonetic spelling of the word in each context, helping you to prnounce it correctly as well.
I think best part I like about WW is that it is available all the time, even when one is NOT connected to internet. That is where it scores big time.
Note: While I was writing that you can use wordweb with ANY application, I realized that it didn't work with gvim7

Slickrun: The magical floating 'Run' bar
I have always been a UNIX person so to speak, because my career started working on Solaris. I have always used and worked on Windows machines as my primary workstation, but was always comfortable with command line and other UNIXy things like vi. In fact this entry is also being written in gvim 7.0, but more about gvim later.
So I do prefer and use windows "Run" bar to invoke various utilities from time to time, say calc, notepad etc. I came to know about SlickRun thru one of the Productivity websites,can't remember which one. I tried it and was hooked onto it instantly.

Slickrun as I mentioned, is a floating toolbar. One can defined a hotkey which will invoke this floating toolbar, that is the first way to reduct reduce the mouse click. Slickrun comes with set of predefined magicwords, and with the ability to define your own ones. magicwords are shortcuts for various frequently used programs that you need to invoke. It lets you customize the appearance, like the background of the flatong bar, the font size, colour etc.

Initially I added the most frequently used programs in the magicword list, and as and when notice myself using particular program frequently, I'll add it to the list.
New Magicword tab of Slickrun has one cool feature called a dropper. You can drag the dropper to a already running program and it will automatically grab the pathname. You can also pass parameters to the binary , and test the new magic word to see if everything works. Slickrun is not limited to invoking programs alone, it can let you open a folder as well.
One more feature I like is auto-completion. It works for the magicwords as well as for filenames. So invoking a frequently used program can take as less as two keystrokes. One Hotkey and then first alphabet of the magicword.

To be continued ....


Read more!

Monday, May 08, 2006

Productivity enhancing Software - Part I

This is first part of series of posts, in which I will be writing about the software that I use on day to day basis. These software help improve my productivty and I hope that these will help you too.

Some background
I like to experiment with new stuff. I'm always trying to improve myself personally as well as improve my productivity. This leads me to try various tools/utilities that would help me achieve either of these two goals. So I download a lot of software, I install and try most of them, I keep very few of them. I keep the ones which I find myself using regularly. Others are uninstalled and downloaded version deleted, to make space for more downloads :)

I have been doing this for quite some time, so over a period of time, some of these tools are my personal favorites, ones I can't live without. I have changed my primary work machine three times in last 10 months. So each time I get a new machine, I install these "must-haves" on them the first. Off course that is right after I change my WinXP to look more like Windows Classic. I hate WinXP default look. To each his own.

So without further delay, lets talk about the software.

Browser
First and foremost is installing "Firefox". I will install whatever version for which I have the downloaded copy, and them firefox will update itself to latest version. At times, when my copy is really old, I'll download the latest copy.

I'll make it my default browser and set the home page. I used to leave it blank, rather than connective to our corporate web site. But recently I point it my personalized google page.

The Extensions
Next thing I install my favorite plug-ins. Now, here also I keep experimenting. Try new ones I read about and leave the ones I use regularly. So the firefox extensions I must have are:IE Tab: Useful when some sites won't work or behave nicely with firefox. Mostly banking sites and internal corporate sites. It has an option either to render the existing page in IE rendering engine, or open IE as external application. I use both these options as and when required.

Tab mix Plus: There is only one word to describe this extension. Awesome !!
It lets you do some cool things with Tabs. Some of my favorites are undo close tab. I needed this only few times. But when you do, it is life saver.
The other feature of this extension, which really deserves to be separate extension of its own, is Session Manager. It can save all open tabs, when you close firefox with multiple tabs open. This is definitely handy and I use this a LOT.

Gmail Manager: It sits in the status bar quietly monitoring the gmail accounts. I have my personalized google page set as my home page. This already has gmail, so why would I need Gmail Manager ? For one thing, I may not be on my home page all the time. But more importantly, Gmail manager can monitor multiple gmail accounts. Now that's neat.

Then there are others like Aardvark, which lets you remove elements from the web pages. Extremely useful for printing just the contents of the page, leaving out the Ads. Get clean print outs and save some toner in the process.

I've also installed All-in-one Gesture, but don't find myself using it as much. May be I'll just remove it.

More to come ..

Part II

Read more!