SharePoint Custom Action in Ribbon

December 18, 2013

Ever wanted to PRINT your list or your custom Form you created.

Well the easiest way would be to add a Custom Print Action to your ribbon or List menu.

To start open the relevant list or form in Sharepoint Designer. In this example it will be a list.

Add a new Custom VIEW Ribbon action

image

Call it “Print” and add this simple JavaScript to the Navigate URL.

image

javascript:
alert('I am Printing now !');
window.print();

Important is that you add this Ribbon Location :

Ribbon.ListItem.New.Controls._children 

image

Don’t forget to add your 32bit icon and save it.

image

Next go to have a look at the result and test it.

image

image

The same procedure goes for a form only the Custom Action location is different.