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!

Thursday, December 22, 2005

Goals/Objectives

Recently I came across this site called 43 Things I think it is a great way to list down the things one wants to achieve. I've seen people use this for very petty things, which personally I wouldn't consider objectives, less even goals. But to each his/her own.

What I found even more interesting is the fact that there are
lot of people who either share same goal as yours or have already achieved that goal. You can also ask for advice from someone who has Done it..

You kinda form a community of like-minded people, which I think is a great motivator.

I've started using this site. For now, I have not listed all my goals. I'm just testing the waters.

BTW, if you are interested, please see the link to my page in the sidebar.
Read more!

Tuesday, November 15, 2005

Disaster with Ubuntu 5.10 Release

Following my experience with Preview release under QEMU I did not get enough time to play with it anymore. Later 5.10 was released. I downloaded LiveCD first, tried it at worked in native mode (not in QEMU) Everything seems to work, so I got bit more adventurous and burned the install CD.
Mind you my previous experience with Ubuntu was always limited to LiveCD version, so I didn't know what to expect, but with all the good publicity ubuntu was getting, I thought, what the heck. Well, thats where I was wrong I guess.

I'm not sure what went wrong, but for some reason when I asked the installer to format my existing ext3 partition, I started getting errors which indicated names of files on my windows partition. After selecting
ignore, couple of times I got scared and cancelled the whole thing.

Result: My windows is rendered un-bootable (if there is such a word)

So what do you do ? Knoppix to the rescue. I burned knoppix 4.02 and booted my machine with it. To my relief, all (I guess I should say most ... more about is later) my data on windows partiotion was intact.

I tried fixboot and fixmbr from XP recovery console, but to my dismay, it did not help. After further investigation I realized that not all my data was intact. Ubuntu had done something to at least three files on system partition, so ended up with files like found.000, found.001 and found.002. Looks like these files (under their original name) are required for XP to boot.

So that is long and short of it.

Plan of Action : Backup important data to USB Stick, re-install XP
Read more!

Tuesday, September 13, 2005

Ubuntu 5.10 Preview LiveCD from within QEMU

I've read umpteen reviews of various distros on various sites and always wanted to write one myself. But burning a CD just to try out a distro is not my cup of tea. First of all it seems ecologically unfriendly that people keep burning CDs for a small stuff and later they won't use it (except for may be Tea-coaster. But how many coasters do you really need ?) Other reason is I know I won't using a distro unless I really really like it. So I prefer LiveCD distros anyday, over the install-and-see-if-you-like breed.

So when I discovered QEMU few days ago, it was best things since sliced bread :)
So now I can
try any LiveCD without having to burn a copy. Coming back to Ubuntu 5.10 Preview, Here is what I discovered.

About Ubuntu 5.10 Preview LiveCD
As the name suggests, this is still a preview so expect some bugs to be there. The help screen shows the Date/Time Stamp of this image as " built on 20050317ubuntu15". This should give you some idea about which preview release this might be if you are comparing against subsequent preview releases.

Booting and Setup
Initial bootup seems faster compared to 5.04 version.
During the bootup/setup process, when I selected "India" as location, it went into loop of choose language/choose location.
When I selected default United States as location, it went ahead with hardware detection part.

Later I got error on the console, although it seems harmless:

Bummer, could not run '/sbin/debian-installer' : No such file or directory
Later part of setup/install is graphical with message in graphics font and a small progress bar below the "ubuntu" logo. The choice of the colour of the font is weird, since it is difficult to read on black console background. White text message on black are easy to on eyse, compared to brown colour which is default for ubuntu.

More about Ubuntu 5.10 Preview later ....

Read more!

Tuesday, September 06, 2005

QEMU

After my previous post, I've been trying to get all the information that I would need to create my own version similar to DevelopGo.

I have already downloaded knoppix 3.9 LiveCD ISO image.
I have got hold of the Remastering Howto , and now all ready to go ahead with my changes.

There are some of the road blocks, although not major ones though. I need a machine with CD Writer, to install knoppix which I'l be remastering. I am planning to do it on my home machine, but I don't have a CD Writer. These days CD-Writers come in very cheap, I'm planning to buy one soon. Then I'll be able to install knoppix and make required changes, and then remaster.

While I was doing this research, I came across an invaluable tool called qemu. This is open source CPU and system emulator. Without going into too many details about QEMU, which I'm sure you can find out from google, what I want to stress is how easy it is to use.
I downloaded qemu windows installer from here. Installation itself is very trivial, just asks for install folder, and then it copies files there. Thats it.
I had couple of LiveCDs burned on CD as well as their ISO images. To boot each ISO image all I had to do was run following command from the command prompt:

qemu.exe -L bios -cdrom //./e: 
Where E: is my CD ROM Drive. I had put the LiveCD in the CDROM and qemu booted from the drive. Similarly instead of using actual CD (which seems a little slower, due to I/O speed of CD drive) I can also point to ISO image directly. like:
qemu.exe -L bios -cdrom D:\download\DamnSmallLinux-1.4.iso
I tried DSL 1.4, Ubuntu 5.04 LiveCD as well as OneBase NetInstaller CD using Qemu. All of them worked very well. Off course, typical to each of these distro, they took less (DSL) or more (ubuntu) time to boot.

One annoying thing I noticed during my experimentation is that when using mouse pointer in ubuntu, qemu goes into what it calls
grab mode. Title of the window changes to Press Ctrl+Alt to exit grab I'm not sure if there are any side effects of this (I didn't notice any, during short time I played with qemu) but it is annoying none the less.

Thats all for now, about qemu. I'll continue to post about my progess with
free version of DevelopGo, in coming days, and any tools like qemu, that I might encounter. Read more!

Monday, August 29, 2005

DevelopGo - How about a free version ?

Last week, I read a review of DevelopGo -A Programmer's Platform. Here are some of the thoughts that came to my mind.

About OneLinuxBase:

It is very clear that the organization is out to make money, it doesn't seem like it is some idealist's pet project. The website looks pretty professional and polished, unlike some website created by reluctant geek(s), who would rather code that make pretty looking website.

Why did they choose yet another package manager, when perfectly well package managers like apt and YaST exist ? Sure they would have there own reasons, the website doesn't mention whether OneLinuxBase is based on any existing distribution, so I can give them benefit of doubt and say that the distribution is built from ground up, so it is likely that they need to have there own package manager.

The basic version is free, other special versions need a small fee. I want to try DevelopGo LiveCD but since it is not free, I did not try it myself. After all, no one is paying me to write the reviews of various distros, yet. I have already tried too many distros, mostly LiveCD ones, so don't want to try one-more.

About DevelopGo:
I think it is pretty cool idea. I have already mentioned that if it were free (as in beer), I would have tried it in a heartbeat, but $10 (converted to local currency) is big sum which I would rather use for something better. So here is what I am thinking now.

The website has a list of applications shipped with each DevelopGo'. I agree that the concept and the selection of software is pretty good. So why not come up with knoppix based LiveCD remastered with the assortment of the applications from the DevelopGo CD ? The idea could be extended to other Go versions. Off course, then release this version for free (as in speech and beer). In order to update existing or add new software, one could include klik client. This could be our free version of DevelopGo.

I think I might just start with this project myself. I can see a lot of learning potential in this project. Now I am thinking of some kool name for this project. Any suggestions ?

Read more!

Wednesday, August 24, 2005

Which Fantasy/SciFi Character Are You?

I came across this cool survey : Which Fantasy/SciFi Character Are You?
Here is how I was judged based on the questionaire.

Enjoy taking taking the survey !!

Jean-Luc Picard

Jean-Luc Picard

An accomplished diplomat who can virtually do no wrong, you sometimes know it is best to rely on the council of others while holding the reins.

There are some words which I have known since I was a schoolboy. "With the first link, the chain is forged. The first speech censored, the first thought forbidden, the first freedom denied, chains us all irrevocably." These words were uttered by Judge Aaron Satie -- as a wisdom, and warning. The first time any man's freedom is trodden on, we're all damaged.

Jean-Luc is a character in the Star Trek universe. This The Next Generation fan site has an outline of his career.


Read more!

Tuesday, August 23, 2005

What should you expect from this blog ?

I was contemplating opening blogger account for quite some time now. Finally I went ahead and opened the account. I already have a personal blog but I don't want to mix the personal and technical blog, hence this new account. Somehow I did not like LJ interface as much as blogger interface (which looks sleek and professional, in my opinion).

I intend to use this blog for technical postings. Publishing technical articles is one of the objectives I have setup for myself. So what better way to publish technical articles without having to wait for someone's approval, than blogging ? BTW, what qualifies as technical is really open to discussion. But suffice to say I define it as non-personal posts, opinions etc. You won't find things about my personal life here for sure.


As such I do not get enough time even for my personal blog (which I opened more than year ago and has
really low number of posts). But here I am hoping that just because I have opened blogger account, I now have a responsibility to post frequently. Read more!