Preview C#, Visual Basic, and C++ Source Code files Direct in Attachments Without Opening

If you’re the developers or programmers, you can have the ability to able to fast preview the contents or the source code contained inside a source code file, without having to open up the file in resource hungry default viewer Visual Studio to view it, especially if you receive the source code file attachment in email. In Windows Vista and Microsoft Office Outlook 2007, the built-in preview feature or previewers is able to render and show the contents for most common file types, and it’s also possible to extend the preview capability to unsupported file types with custom preview handlers add-ins. However, if you just want to be able to preview C#, Visual Basic, and C++ code files (with .cs, .vb, .cpp, and .h extensions), here is a simple trick to enable the preview handlers for these source files without any installation.

By default, Windows Vista and Office 2007 comes with Microsoft Windows TXT Preview Handler, which is the preview handler that renders .txt text files. However, this Windows TXT Preview Handler can handle more file types than it’s actually registered to support by default, as nothing in this preview handler that restricts it to working with just a text file with .txt extension, and prevents it to working from text files with other extensions.

As you know, C#, Visual Basic, and C++ source code files in .cs, .vb, .cpp and .h extensions are also a text file, which is fully supported to render by Windows TXT Previewer Handler. However, Windows Vista and Outlook 2007 don’t register the association of these file types to be rendered for previewing by Windows TXT Preview Handler by default. To enable the support of preview for file with extension of .cs, .vb, .cpp and .h, simply copy and paste the below text into a text editor, and save it as a file name with .reg extension. Then double click on the .reg registration file to merge or insert the registry value into Windows registry.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.cs\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@=”{1531d583-8375-4d3f-b5fb-d23bbd169f22}”

[HKEY_CLASSES_ROOT\.vb\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@=”{1531d583-8375-4d3f-b5fb-d23bbd169f22}”

[HKEY_CLASSES_ROOT\.cpp\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@=”{1531d583-8375-4d3f-b5fb-d23bbd169f22}”

[HKEY_CLASSES_ROOT\.h\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@=”{1531d583-8375-4d3f-b5fb-d23bbd169f22}”

Once registered, you can now view or preview the source code directly from Outlook 2007 even if it’s send as the e-mail attachments, without the need to open to source code file in Visual Studio or other text editor.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.

New Articles

Incoming Search Terms for the Article

c# atm code - Search how to open up files that are coded - hindi C# - C# serial source - c# c++ hindi pdf search - c++ atm, code - c# Registry HKEY_CLASSES_ROOT pdf - get email attachments visual basic - how to program chinese checkers source code on c - Visual C# download - c# create outlook preview - ms outlook text file previewer - "windows 7" explorer new "preview handler" for text files - C# Coding of Tabbed browsing in Internet Explorer 7 - source code file direct mail - ATM code for c++ - c++ atm code - outlook cpp h preview - preview c# - text file preview c# - keygen source code cpp - read file txt from source c# - VB source code + merge files -