Hey Gang,
I've modified the ExportAllStories script to add a page number to the file name for each exported story. However, after doing some testing the page number is not always correct.
I made a document with 5 pages and 5 text boxes containing their page numbers so I could move these boxes to different pages to see the page numbers change but this is not always happening.
For example, I put Box 5 on page 1 so I would expect Page1 StoryID1401.txt to contain “Page 5” but this is not happening.
Could the page number depend on the page each box was created on? Or is there something wrong with the script?
This is part of what I added:
function myExportAllStories(myExportFormat, myFolder){
for(myCounter = 0; myCounter < app.activeDocument.stories.length; myCounter++){
myStory = app.activeDocument.stories.item(myCounter);
myID = myStory.id;
myFrame = app.activeDocument.pageItems.item(myCounter);
myPage = myFrame.parent.constructor.name;
if (myPage == “Page”)
myPage = myFrame.parent.name;
I can post the whole thing if it would be helpful.
Thanks.
Joe