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.
Custom Search

New Articles

Incoming Search Terms for the Article

c# outlook previewer - ipreview handlers c++ - sharepoint c# download attachment - "vb 2008" outlook email - atm c++ program source code - video preview wia c# - c# open email attach - coding atm visual studio c++ - direct open pdf c# - outlook previewer for source code - window preview c# - C# pdf preview - download source code on multi touch using c# - visual basics 2006 c++ - outlook configure previewer for text files - Microsoft office accounting discontinued "source code" - registry editor source code c# - vb anti virus source code - atm c kodu - atm sourcecode - vba file preview - visual basic source codes extension - "code to merge to files using dierct show in c++" - registry mobile phone c# - c++ previes display text file - c# source outlook view - cfg to pda c++ source codes - outlook previewer c-file - Preview text file in C# .net - c# outlook preview - preview handler for c++ code? - translate basic to c++ - atm source code in c++ - atm vb code - crack c# - digital cameras vb6 source code - preview file pdf in c# - source code vietnamese c# - C# kodai - atm c# code - c# atm code - c# file preview - VB c++ source games - vba code to translate english to hindi - c# how to outlook view source - photo printer a562 -