SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a problem with list item and printing them. I must create workflow or jscript printing this item using template. Steps that I need to do:

  1. Select item/items on list
  2. Run workflow or jscript (using button)
  3. There will show window using template with data from selected item
  4. In this window should be PRINT button
  5. Click Print - and then printing

I'm beginner with programming so jscript and custom workflow will can be difficulty. Can anyone have any proposition?

I have found this script:

<script type="text/javascript" language="JavaScript">
//Controls which Web Part or zone to print 'TD ID'
var WebPartElementID = "onetIDListForm"; //SharePoint Main Content ID
//Function to print Web Part
function PrintArea()
 var bolWebPartFound = false;
 if (document.getElementById != null)
  //Create html to print in new window
  var PrintingHTML = '<HTML>\n<HEAD>\n';
  //Take data from Head Tag
  PrintingHTML += document.getElementsByTagName('head')[0].innerHTML;
  PrintingHTML += '\n</HEAD>\n<BODY class="printSQS">\n';
  var WebPartData = document.getElementById(WebPartElementID);
  if (WebPartData != null)
   PrintingHTML += WebPartData.innerHTML;
   bolWebPartFound = true;
   bolWebPartFound = false;
   alert ('Cannot Find Web Part');
 PrintingHTML += '\n</BODY>\n</HTML>';
 //Open new window to print
 if (bolWebPartFound)
  var PrintingWindow ="","PrintWebPart",
  // Open Print Window


Every think is OK,but how I can define the place where template is?

share|improve this question
Hi Ripperus, what is your exact question ? i bet you can find scripts for the task been given to you through google – Muhammad Raja Jun 29 '12 at 7:27
Hi, I don't have any idea how to start... and you have right, I looking for that but with any results. – Krzysztof S. Jun 29 '12 at 7:57
Any solution for that? – Krzysztof S. Jul 4 '12 at 8:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.