Version History Trimmer

The version history trimmer code currently deletes all the versions from just one document.But this will give you an idea of how to make it work for multiple documents as well

here is the code below on how to  use it

Version Trimmer :

below is what you will see

  1. ARF.docx has 2 versions as shown below


2. Select ARF.docx and click on Trim


3. It will start trimming the versions


4. No check the version history again


Please Note:

In the code function AddTrimmerIcon() is used to add the icon in the list tool bar as you see in the images. You can add your own text and image in that section.

Currently it deletes all the version. So please feel free to modify based on your requirement.

Happy SharePointing!!!


account_box dsouzajoel30


Leave a Reply