A customer recently complained that when they printed lists the printout didn't include the quick launch, which is great, but it did include things like the bread crumbs and tool bar. It is quite simple to complete. I updated one of our product's core features to include this code, however it can be done in a few easy steps.
In the end, you want to get the following code into the site or onto a page
The Code
<style type="text/css">
@media print
{
.ms-titlearea,.ms-listdescription,.ms-menutoolbar {display :none; visibility:hidden }
}
</style>
Use SharePoint Designer for an entire web
Use a web part for a single page
Use a feature for an entire site collection
Use SharePoint Designer
This will be the easiest for a non-developer who wants to update the entire site.
- Download SharePoint Designer (free from Microsoft) and open your site.
- Navigate to _catalogs\masterpage and open default.master.
First save a copy of this as a backup!
- This next part may be scarey but it really is easy. Click Code at the bottom left of the content window

- Now you're looking at a lot of code. Around line 8 should be a <HEAD tag. Click at the end of the tag, to the right of the > and press ENTER for a new line. Copy and paste the code above, you should have something like this:

- Now save and close it all out. Now every page referencing this master page in the site will print the same. If you have multiple sites you will need to do the same steps for each site.
Use a Web Part
If you want this functionality on a few pages and updating the master page isn't necessary, follow these steps.
- Browse to the list you want to print.
- Click Site Actions then Edit Page. If an Edit Page option isn't available, in the address bar add the following at the end of the URL to set it to edit mode: &pageview=shared&toolpaneview=2.
- Add a content editor web part.
- Edit the web part and click Source Editor and paste in the above code, from <style... to </style>.
- Click OK and OK and then leave the page and come back in. You should be all set!
Use a Feature
This will require development skills, Visual Studio 2008 and so on. I will cover the basic files, I'm assuming you know something about SharePoint development. I use WSPBuilder for SharePoint development and I'll be following their project layouts.
In your project, you need to do the following
- Create a new folder: 12\TEMPLATE\CONTROLTEMPLATES.
- Inside of this folder, create a new ascx file, i.e. print.ascx.
- Inside of the ascx file, throw in <%@ Control %> and then paste in the code above.
- In your elements.xml file, add the following: <Control Id="AdditionalPageHead" Sequence="101" ControlSrc="~/_controltemplates/print.ascx" />
- My feature is scoped as site, I don't know how well this will work scoped web.
Blamo, that's it! Deploy the solution and you should be printer happy all the way through!
0187fddc-00b2-4bb2-808b-88ee453da3d6|1|5.0