IDCS4 Open Document

Dear All,
Below code I am using for opening any InDesign file.

		set thePath to "Macintoch:SO_Cache:" as string
		if exists ((thePath) & "58999_01" & ":" & "58999_01" & ".indd") then
			set SavePath to (thePath & ":" & "58999_01" & ":" & "58999_01" & ".indd")
			set myDocument to open (thePath) & "58999_01" & ":" & "58999_01" & ".indd"
			if modified of myDocument is true or saved of myDocument is false then
				save myDocument to SavePath
			end if
end if
on error
set myDocument to make document
end try

If I am trying to open any InDesign CS3 file in InDesign CS4, then it is creating a new document. It is not going to the line of checking modified or not saved. It is opening file as well.

Is there any possibility to fix this issue.


Try using “if modified of document 1…” instead of the reference.

Thanks Shane!!!
It was my mistake actually.
I was saving thePath using POSIX and again I were trying to use &“:”& with 58999_01. So program was unable to identify the save path.


exists (path)

will always return true because you’re checking a literal string.
Only the Finder and System Events can check a file or folder by a string (HFS) path