open mgThisItem without showing window
set mgDocName to name of active document
set text item delimiters of AppleScript to ".indd"
set mgShortName to text item 1 of mgDocName
set targetFolderPath to my createFolder(mgShortName)
set text item delimiters of AppleScript to ""
set mgPackageFilePath to targetFolderPath & mgShortName as string
set mgProofFilePath to mgPackageFilePath & ".pdf" as string
set properties of PDF export preferences to properties of PDF export preset "[Smallest File Size]"
set mgThisItem to choose file
set targetFolderPath to path to desktop as string
set mgShortName to do shell script "FILENAME=$(basename " & quoted form of POSIX path of mgThisItem & ");NOEXT=${FILENAME%.*}; echo $NOEXT"
set mgProofFilePath to targetFolderPath & mgShortName & ".pdf" as string
tell application "Adobe InDesign CS6"
try
set thisDoc to open mgThisItem without showing window
export thisDoc format "Adobe PDF" to mgProofFilePath using "[Smallest File Size]"
close thisDoc saving no
on error theError
display dialog theError
end try
end tell
I try the following, but it’s not working
Can you please help me
tell application "Adobe Acrobat Pro"
repeat with myDoc from (count myFilelist) to 1 by -1
set myCurrentFile to item myDoc of myFilelist
open myCurrentFile with invisible
end repeat
end tell