Applescript InDesign 2025 export JPG no longer works
Hello everyone.
I created a script 2 years ago with INDD 2022 (I think).
When I try this script with INDD 2025 and MacOS Sequoia, it no longer works.
Basically, it creates QR codes from urls in an XLS file and export each QR codes as a JPG with a specific name.
There are more than 400 JPGs to do.
I've reduced the script as much as possible to find the error... and I don't understand.
JPG export doesn't work (I don't have a JPG file) without any error;
PDF export produces an error: Error in Adobe InDesign 2025: Unable to export PDF file (something like this… this is a translation of my french version)
Any idea?
Thanks a lot
tell application "Finder"
set myJPGfolder to "Macintosh HD:Users:olivier:Desktop:JPGs:" as alias
end tell
tell application "Adobe InDesign 2025"
activate
tell active document
set myRectangle to make new rectangle with properties {geometric bounds:{5, 5, 25, 25}}
set QRCodeURL to "https://www.apple.com"
set JPG_Name to "945_0"
Create Hyperlink QR Code myRectangle url link QRCodeURL
set myJpgFilePath to (myJPGfolder & JPG_Name & ".jpg") as string
set myPDFFilePath to (myJPGfolder & JPG_Name & ".pdf") as string
export to myJpgFilePath format JPG
export to myPDFFilePath format PDF type
end tell
end tell
