For my part, given the frequency with which this question has been asked, I can start forming a conclusion that, if there is a proper way to do what you are trying to do, it's not obvious. I can look into whether a feedback item has been raised related to closing multiple tabs and, if not, submit one on our user's behalf.
In the meantime, hope these other discussions provide some guidance and, if not, respond right here explaining why and hopefully you'll get additional community feedback.
Hey B, no luck on this yet here. Appreciate if you could pitch in to get some expert advise. I would like to see if anyone got this working in PRPC 7.1.7 before I can raise an SR related to closeAllDocuments method.
I have reached out to a couple SMEs. They are all based in IST so it may be a day before they have a chance to look. Regardless, I would recommend holding off logging an SR. This sounds like something where even if there is a way to do this, it will be more of a workaround than a solution, which means this would be better served as being raised as an enhancement request, which I can certainly do on your behalf.
Hopefully, you get some feedback soon. And if not I will keep working to try and get this some attention.
I'm glad to see that you are getting some more positive results with some of the other questions you have raise, but thanks for your patience on this one.