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 = window.open("","PrintWebPart",
  // Open Print Window

By http://amitphule.blogspot.com/2011/09/print-button-on-sharepoint-page.html

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

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.