Posted by: kurtsh | March 16, 2007

DOWNLOAD: XPS & Other Microsoft Preview Handlers for Outlook 2007/Windows Vista

It’s rare that I’m the one to state the obvious but what the heck’s up with Windows Vista & Office 2007 not providing a Preview Handler for the .XPS format?  Isn’t a .XPS Handler obvious?  Shouldn’t I be able  to view a .XPS file in the Outlook Preview Window in the same way I view a .DOCX file or a .PDF file if I have the right Preview Handler installed?  Or do the same in an Windows Vista Explorer window when using the Preview feature?  (See picture for how to turn this on)  This in my opinion is a gross oversight and I’m curious as to why we left one out. 

MSDN TO THE RESCUE!
Fortunately, the folks in MSDN has provided all the tools necessary to cobble together your own solution.  Stephen Toub & Ryan Gregg already wrote a bunch of Preview Handler code in .NET a month ago and provided it as a learning kit in MSDN Magazine to enable other people to write their own Preview Handlers.  And they provided an installable .MSI file which will install not only an XML Preview Handler (to view .XML files cleanly within Outlook/Windows Vista Preview) but also a XPS Preview Handler as well based on the same code.

REQUIREMENTS:
1) Visual J# Redistributable Package
The only downside is that the install requires that you as a lay person to also install the Visual J# Redistributable Package from here:  http://www.microsoft.com/downloads/details.aspx?familyid=F72C74B3-ED0E-4AF8-AE63-2F0E42501BE1&displaylang=en (3.6MB)

2) MSDN Preview Handlers Package
After the Visual J# redistributable package is installed, you need to do two steps:  First you need to download the MSDN Preview Handlers Package from here:  http://msdn.microsoft.com/msdnmag/code/?url=http://msdn.microsoft.com/msdnmag/issues/07/01/PreviewHandlers/Default.aspx
Once you install this to a directory on your system, there will be a directory called PreviewHandlersInstallerPreviewHanderls setup.MSI.  The .MSI file needs to be run as an Administrator.

Once installed, you’ll find immediately that .XPS files preview just fine using the newly installed Preview Handlers… and more!

AND MORE?
That’s right.  This package installs two primary .DLL’s – MSDNMagXAMLPreviewHandler.dll and MSDNMagPreviewHandlers.dll.  And these include Preview Handlers for all sorts of files.   Here’s a quick listing of the types of files that now can be previewed using this package;

  • MSI Preview Handler 
    This might not be useful in Outlook 2007 unless you’ve tweaked it to allow the receipt of .MSI executable files however it’s certainly useful for Windows Explorer’s Preview Pane.  It tells you the contents of the .MSI file, the size of each file and the version of each file by default. 
  • CSV Preview Handler
    A CSV file is a comma-separated value file which is more commonly associated with Excel or development.  The preview pane will display a .CSV file as if it were a spreadsheet.
  • ZIP Preview Handler
    Besides showing the content of a ZIP file directly within the preview pane of Windows Explorer or Outlook, it will allow you to directly open any of the files within the ZIP file just like accessing a directory.
  • BIN Preview Handler
    This will show the hexidecimal code within a given .BIN or .DAT file directly within the Preview pane. 
  • XAML Preview Handler
    XAML is Extensible Application Markup Language and is an amazing flexible way to define graphically rich visual user interfaces, similar in nature to Macromedia Flash however the content is not in a special .SWF file but rather entirely in XML making it very easy to inspect and developer friendly.  This preview pane will display a XAML file directly within the preview pane.   If you’d like to see an example of this you can download a ZIP of XAML files here:  Skippy.zip.  There is also a write up about creating and programming the animation in XAML here:
    http://blogs.msdn.com/wpfsdk/archive/2006/05/23/Animating_XAML_Clip_Art.aspx

    This is what the XAML Preview Handler in Windows Explorer looks like:


Categories