Any help appreciated.
My problem is that the only way I can access the frames is to get them by the order they appear on the page. This is not a good solution as it is possible that at a future date a designer may add frames to the template which would stop the script from working. Is it possible to find the text frame from the XML tag it is associated with? I know this is possible in the actual application but what I would like is to get a reference dynamically in the script.
TextFrame.itemByID works but is no use because the ID seems to change when new elements are added to the document.
I feel I must be missing something...
For an element associated to a story, you can get the story from the
xmlContent property. The parentStory property gives you the story that
contains the element. From the story you can get the associated frames.