You will need to clarify your question a bit, as I didn't quite understand what you're asking. You seem to be asking two different questions: (1) How to print the tree control content for documentation; (2) How to list all printers available. I also don't understand what the list of printers has to do with the COM ports.
For (1), you can generate whatever string you want that is meaningful. You will need to navigate the tree using the "Get Child" and "Get Next" methods to create your string.
For (2) see
this reply.