Not knowing what you want to do with it there may be better solutions out there.
Two of Lee Mac routines that may be of use:
http://lee-mac.com/layoutfield.htmlThis program defines a set of commands which enable the user to populate a selected annotation object (Text, MText, Attribute) with a field expression referencing the name and position of the layout in which the object resides.
Contrary to the typical use of the CTAB system variable, as offered by the standard AutoCAD FIELD command, the field expressions generated by this program directly reference the ActiveX Layout object within the Layouts Collection, and therefore do not depend on the layout being current in order to display the correct output.
This is particularly advantageous when using the DATAEXTRACTION command to retrieve data from multi-layout drawings, as field expressions which reference the CTAB system variable will yield the same value for every layout when processed by this command.
http://www.lee-mac.com/tabsort.htmlA program designed with the intention to aid in the organisation of layout tabs in a drawing, the program enables the user to organise each layout tab using intuitively engineered buttons to move selected tabs up/down or to the top/bottom of the tab order.
The program also offers the ability to rename a layout tab by double-clicking on its entry in the list displayed, and furthermore add a prefix and/or suffix to selected/every layout tab.
A facility is also provided to add & delete layout tabs, and also sort the tabs into alphabetical, numerical, or architectural order; or reverse the order currently displayed.
A Find & Replace functionality is also offered to allow the user to quickly replace a text string in multiple layout tabs.
The user may also copy selected layout tabs, or set the selected entry as the current drawing layout.
A Help Dialog may be shown upon pressing H at the Main Dialog interface.