Indesign last saved version

I want to be able to choose an Indesign file, and get version of Indesign it was opened with. Is there any way I can do that?

That depends if the files save that information (Apple won’t) and also probably whether Indesign is scriptable; to find out if it’s scriptable open AppleScript Editor, go to file>open dictionary and look for your app.

The version of ID the file was last saved with is in the file. I have seen posts on this issue in Adobe’s Scripting forum the solution was however in ExtendScript. It meant reading certain bytes into the file then getting a string so the equivalent should be possible thru AppleScript.

Try:

set theVersion to id of (read file pathToFile from 33 to 33)

Finally here is how I wrote this thing. You drop your files to the application, it will get the version of the file and open it in the right version.


on open these_items
set myfile to item 1 of these_items
tell application “Finder”
set theVersion to file type of myfile as string
end tell

if theVersion is "IDd7" then
	tell application "Adobe InDesign CS5" to open alias myfile
	tell application "Adobe InDesign CS5" to activate
	activate
end if
if theVersion is "IDd6" then
	tell application "Adobe InDesign CS4" to open alias myfile
	tell application "Adobe InDesign CS4" to activate
	activate
end if
if theVersion is "IDd5" then
	tell application "Adobe InDesign CS3" to open alias myfile
	tell application "Adobe InDesign CS3" to activate
end if

end open


The only issue I have is that all versions of Indesign have to be opened, otherwise if only CS5 is open as an example, even if I drag a file done is CS4, it open it in CS5. This issue is not only with Indesign, if I write a script for photoshop, if CS4 is open and I put a tell command to CS5, it open in CS4.