This project is read-only.
Project Description
Using the Open XML SDK to assemble composite documents from a SharePoint document library.

This project provides a custom application which extends SharePoint document libraries such that it allows users to pick component documents and fuse them together into a single output document.

The screenshot shows a custom application page which consists of 4 main areas. Looking at each in turn:
  • Document Profile: This provides some context information about the document which is currently in focus (selected) in either of the main treeview controls including the document filename and icon or a preview image if available.
  • Select Component Documents: This area provides controls to select a view from the document library and also to pick individual documents (those checked in the treeview control) for selection as component documents to be fused into the resulting output document.
  • Document Insertion Points: The application page is accessed via the ECB menu item "Build Document" of document in the library. This menu item is only available to documents which are of a specific Content Type (the Content Type and associated Site Columns are shipped with the solution). Documents of this Content Type are based on a Word 2007 document defined with Content Controls which act as placeholders for where component documents may be inserted. These document insertion points are represented by the treeview. You use the Left and Right arrow buttons to move component documents between the two tree views.
  • Output Options: This is where you specify the target file for the resulting output and the output format which is usually appended content (for text based documents and graphics) but you can also embed Excel spreadsheets and PowerPoint presentation as an embedded objects which can be activated within the resulting document. The solution does not currently support pdf, xps or multimedia files as embedded content but all file types can be added as hyperlinked content. You can also select one of the component documents to be the master source of meta-data and the Content Type for the generated output document.

When the Build button is clicked the selected component documents are fused into a single output file (the only currently supported format is .docx but with Word Services coming in SharePoint 2010 it should be possible to support other output formats such as pdf). You can choose what you want to have happen when you click the Build button.

For a more detailed explanation of how I built this solution and how to use it please refer to my blog

Note that to get this application up and running you will first need to download and install the Open XML SDK which can be found here.

Last edited Jan 13, 2010 at 5:11 PM by ColinGardner, version 4