I too have a script issue with InDesign
So, in light of of others who have posted about scripts not working since updating to Indesign 2025, I was hoping someone here is far more savy than me could take a look at this script and let mw know how it could be edited to work:
tell application "Adobe InDesign 2025"
set doc_name to active document
set doc_pages to every page of doc_name
set file_name to text returned of (display dialog "Please enter a File Name:" default answer "" buttons {"Cancel", "Ok"} default button 2 with icon 1)
set pdf_style to name of every PDF export preset
set export_style to (choose from list pdf_style with prompt "Select PDF Export Preset") as string
set folder_path to (choose folder with prompt "Please select your destination folder...") as string
repeat with anItem in doc_pages
set page_number to name of anItem as string
count characters of page_number
if length of page_number is 1 then
set new_number to text -3 thru -1 of ("00" & page_number)
end if
if length of page_number is 2 then
set new_number to text -3 thru -1 of ("0" & page_number)
end if
if length of page_number is 3 then
set new_number to page_number
end if
if length of page_number is 4 then
set new_number to page_number
end if
set PDF_name to folder_path & new_number & "" & file_name & ".pdf"
set page range of PDF export preferences to page_number
tell doc_name
export format PDF type to PDF_name using export_style without showing options
end tell
end repeat
beep 3
display dialog "Your PDFs were successfully exported" buttons {"Done"} default button 1
end tell
Thanks in advance to anyone who can assist!
