Get all categories used in a Document list

I don’t think you can get the used Categories without checking elements, but you can certainly get all project Categories. Take a look at this thread and see if it gets you started.