I am writing an add-on that keeps state information for instances of macros on a page.
I want to retrieve the state of each instance of the macro on a page (there may be many), by referencing its macro id, but the macro id gets changed each time the page is changed.
I can set the id manually using the macro editor dialog box, but I can't see now to set the id programmatically. I don't want to have to manually set an id for each instance of the macro.
How can I programmatically set the macro id for an instance of a macro on a page?