I frequently sent or receive mail with source code attachments (.c, .cpp, .h, .js, etc). It would be easier if I could preview these files in Outlook, so I do not need to open in another application.
Preferably, the preview would include syntax highlighting, similar to Visual Studio.
Is there a Visual Studio preview plugin for Outlook?
I use Visual Studio 2010 pro and MS Office 2007 Pro+
You have (2) options here - you can roll your own or leverage an existing preview handler.
Windows Preview Handler Pack: handles aspx, cs, css, js, sql, vb, etc.
You should checkout the Preview Handler Framework used by both Windows Shell and Office Outlook. There is a great walkthrough and sample code for building managed previewers in the January 2007 edition of MSDN magazine.
Channel9 has a video presentation describing the managed preview handler.
The Preview Handler Editor will show you what extensions are associated to what previewers.
Preview Handler Registry Configuration describes the registry key configuration used when looking for preview handlers.
Once you have the hook for the previewer in place - it would be up to you how you handle syntax highlighting, etc.