none
Add print button on Ribbon Using Sharepoint 2010 ? RRS feed

Answers

  • Hi,

    You can check below code.

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction
      Id="print_button"
      RegistrationType="List"
      RegistrationId="101"
      Location="CommandUI.Ribbon">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition
             Location="Ribbon.Documents.New.Controls._children">
              <Button
               Id="Ribbon.Documents.New.Controls.print_button"
               Alt="Print_button"
               Sequence="10"
               Image32by32="/_layouts/images/print.GIF"
               Command="print_button"
               LabelText="Print"
               TemplateAlias="o2"/>
            </CommandUIDefinition>
          </CommandUIDefinitions>
          <CommandUIHandlers>
            <CommandUIHandler
             Command="print_button"
             CommandAction="javascript:window.print();" />
          </CommandUIHandlers>
        </CommandUIExtension>
      </CustomAction> 
    </Elements>

    Also can check below link for step by step solution.

    http://aarebrot.net/blog/2010/09/adding-a-custom-button-to-the-ribbon-using-a-feature-in-sharepoint-2010/


    Did you find this Helpful? Please Mark it So! Thank you. Sachin Kumar


    • Edited by Sachin Dagar Wednesday, December 19, 2012 5:59 AM
    • Marked as answer by Maggy111 Monday, December 24, 2012 11:23 AM
    Wednesday, December 19, 2012 5:58 AM