Opening an Acrobat file

Hi
Can someone please tell me how to do this script so that preview_file gets opened in Acrobat
Thanks


property pdf_archive : alias "Macintosh HD:Users:mindtpi:Desktop:Archive:"

on open thefiles
	repeat with thisfile in thefiles
		tell application "Finder"
			set file_name to name of (info for thisfile)
			set pub_date_folder to make folder in folder pdf_archive
			set name of pub_date_folder to file_name
			move thisfile to folder file_name of folder pdf_archive replacing yes
			set preview_file to duplicate thisfile
			set name of preview_file to "Preview - " & file_name			
			end tell
	end repeat
end open

Hi, mindtpi.

I’m not clear if you mean “gets opened by the script in Acrobat” or “opens by default in Acrobat”. The following does both so that you can edit out what you don’t need:

property pdf_archive : ((path to desktop as Unicode text) & "Archive:") as alias

on open thefiles
	repeat with thisfile in thefiles
		tell application "Finder"
			set file_name to name of thisfile
			set pub_date_folder to (make folder in folder pdf_archive with properties {name:file_name})
			
			move thisfile to pub_date_folder replacing yes
			set preview_file to duplicate thisfile
			set new_file_name to "Preview - " & file_name
			set name of preview_file to new_file_name
			
			-- Since the Finder references by name, we need a new reference for the renamed file.
			set preview_file to file new_file_name of pub_date_folder
			
			-- These two lines make the file open by default in Acrobat.
			set file type of preview_file to "PDF " -- ie. "PDF" & space
			set creator type of preview_file to "CARO"
			
			-- This opens the file now in Acrobat.
			open preview_file using application file id "CARO"
		end tell
	end repeat
end open

Thanks!! Works perfectly!!