Cut-n-paste your code nicely

One thing that has annoyed me quite a lot lately is the way that cut-n-paste code from visual studio 2005 fails to look nice in emails. Your tabs dissappear you very large line gaps for every new line in your code and it sets the text to be a very strange font. Now maybe it’s just me and my usage of the ancient Outlook 2003 but this has always bugged me.

I do tend to send code snippits to quite a few people via email to clear up problems with programming for ANTS Profiler and SQL Toolkit (look ma’ links). After prompting from Rob who works beside me you can fix this annoyance by pasting your code into Word and then cut and pasting from word into your email ( assuming your email is in HTML format ).

Voila! Robert’s your fathers brother. Bingo! Yahtzee! The code looks just like it did in visual studio.

Now if only I could be bothered to write a macro or add-in which did it straight from Visual Studio it would be wonderful.