I have to devide documents into new documents containing each only one spread from original.
I have a script from a friend that perfectly works, but … I need to fix the old page numbering for the new documents.
Can anybody complete my script? This would be great.
tell application “Adobe InDesign CS2”
set myFile to full name of active document
set myPath to file path of active document as string
set myDocName to name of active document
set nSpreads to count spreads in active document
if nSpreads > 1 then repeat with n from 1 to nSpreads tell application "Finder" to set nuFile to duplicate myFile set nuName to myDocName if nuName ends with ".indd" then set nuName to characters 1 thru -6 of nuName as string end if set nuName to nuName & n & ".indd" set nuSaveFile to myPath & nuName open nuFile set myCopy to active document set allow page shuffle of document preferences of myCopy to false if n < nSpreads then delete spreads (n + 1) thru nSpreads of myCopy end if if n > 1 then delete spreads 1 thru (n - 1) of myCopy end if save myCopy to nuSaveFile close active document tell application "Finder" to delete nuFile end repeat end if