If you can search your AUT for each tab page opened or if you already have a list to each tab page opened you can traverse that list and send a tabpage.close.
Use a foreach loop to go through each tab page and close it. But you need to know what is opened or be able to search the AUT for what is opened.

If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!