For some code to process all documents in a selected folder, see:
https://www.msofficeforums.com/45854-post2.html
and, to extend the processing to the selected folder's sub-folders:
https://www.msofficeforums.com/47785-post14.html
There is no need to add the code to more than a single document or template - all you need to do is ensure the document or template is accessible by all who need to use it (e.g. by storing it in a workgroup folder).
Since you haven't said what you're doing with the results of all this processing - or even posted the code you're using - I can't help with that at this stage.