In our project, we use the SharePoint 2010 wiki to document our solutions. We needed to export this in PDF format when releasing the solution to production, so that we could pass over a formal documentation set to the operations team, and not just refer to a constantly changing wiki, which also had a number of pages irrelevant to operations. We looked at some 3rd party solutions, such as the Wiki Publisher from Bamboo solutions, but it did not do what we wanted. Fortunately, our project manager, found a solution. We extended this a bit, to better fit our need and to create a professionally looking Word document, which we could also export to PDF, of course.
How to export Wiki to Word
First, we added three additional fields to our Wiki library:
|Printout in System Documentation||Exclusion of pages||Choice||yes/no|
|Printout Section Number||High level sorting||Choice||10 – Intro
20 – Services
30 – migration
|Printout order inside section||Lower level sorting||Choice||10, 20, 30, etc.|
All these fields were added to the standard view, and we created a datasheet view for more efficient setting of these values.
Then we created a new view, called “PrinterFriendlyView” as follows:
- Remove all columns except “Wiki Content”
- Set sorting to use the “Printout…” fields described above
- Set filter to be “Printout in System Documentation” = “yes”
- Set “Style” to “Newsletter”
- Set “Item Limit” to 999
Open this new view, and follow these steps:
- Mark all the text (this is a little awkward, I found it easiest to start from the bottom and go upwards)
- Open a blank document in Word and paste in all the content
- You will probably get some warnings, where clicking “No” is probably the best (I didn’t test clicking “Yes”)
Warning text: “This operation will require copying many styles. Do you want to use Normal style instead?”
- Change “Verdana, font 16” to “Heading 1” style (this may differ for your wiki – hopefully you have some consistent formatting for page headings that you can use)
a. Open the “Search/replace” dialog in Word
b. Click on “Replace”
c. Click on “More”
d. Click in the “Replace with” box and then click the “Format” button at the very bottom. Choose “Style -> Heading 1”
e. Click in the “Find what” box and then click the “Format” button at the very bottom. Choose “Font -> Verdana, 16pt”
f. Click “Replace All”
- Modify the style for “Heading 1”, paragraph setting, to include a page break before each occurrence.
- Go to the start of the document
- Add a heading:”System Documentation”, using “Title” style
- Add a text underneath: “Table of Contents, using “SubTitle” style
- Underneath, include a Table of Contents, using these steps (assuming Word 2010):
a. In ribbon, click “References”
b. Click “Table of Contents”
c. At the bottom of the list, click “Insert Table of Contents…”
d. In the creation dialog, set “Show levels” to 1, and click OK.
e. Verify that the table of contents makes sense, you may, e.g., have some extra paragraphs marked as “Heading 1” where they should not have been.
- Choose “Save As” and set format to PDF.
Voila, your nice, professional looking PDF is ready for sending to your operations team!
The PDF will even have clickable links in the table of contents, thanks to the nice Word-to-PDF export functionaly.