Could anyone help me with this one, I can’t see why this script works perfectly in 10.9 but fails in 10.11 - same version of Acrobat DC is running on both Macs.
set thefolder to choose folder with prompt "Source Folder?"
set targetFolder to (choose folder with prompt "Destination Folder?") as text
tell application "Finder" to set filelist to every item of entire contents of thefolder
repeat with myFile in filelist
set {name:fileName, name extension:fileExtension} to myFile
if name extension of myFile is "pdf" then
try
set docNameToSaveTo to text 1 thru -5 of fileName & ".ps"
set docToSavePath to targetFolder & docNameToSaveTo
tell application "Adobe Acrobat"
open file (myFile as text)
save document 1 to file docToSavePath using PostScript Conversion --with embedded fonts, halftones and TrueType without binary, annotation, images and preview
close document 1 saving no
end tell
on error errMsg number errNum
display dialog "An error occurred: " & errNum & " - " & errMsg buttons {"Cancel", "OK"} default button "OK"
end try
end if
end repeat