Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to preview code attachments in Outlook?

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+

like image 771
Jury Avatar asked Feb 13 '12 11:02

Jury


People also ask

Why can't I preview PDF files in Outlook?

Making Sure That "PDF Preview Handler" is Enabled So, ensure that it is enabled by following the below steps: Step 1: Open Outlook. Step 2: Go to "File">" Options">" Test Center">" Trust Center Settings">" Attachment Handling". Step 3: Here, ensure that the "Turn off Attachment Preview" option is unchecked.

How do I change the view of attachments in Outlook?

While in the Attachment Explorer, there are several ways to change the file display: Click the Views button to choose another view: switching to a smaller detailed list of the attachments in this folder, larger thumbnails, etc.. Click the Sort button to change sorting by attachment name, type, received date, etc..

How do I turn on preview in Outlook?

Always preview messages is turned off by default, but you can turn it on or off at any time. On the View tab, in the Layout group, select Reading Pane, and then select Options. Select or clear the Always preview messages check box.


1 Answers

You have (2) options here - you can roll your own or leverage an existing preview handler.

Existing Preview Handlers

Windows Preview Handler Pack: handles aspx, cs, css, js, sql, vb, etc.


Custom Preview Handlers

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.

like image 138
SliverNinja - MSFT Avatar answered Sep 19 '22 07:09

SliverNinja - MSFT