If you have the document collection on the screen that you want to process and it's "all" of them why do you need to select them first?
Seems an un-neccessary step.
You can use the column header api to select them all in ssjs as well as the mentions csjs if that is a requirement.