AppleScript Error (-1728): Preview got an error: Can't get every document.
This can happen when working on a Mac and the application in which the file is opened does not have a working AppleScript interface for editing the file.
Example: When the image is opened in Preview, the error is shown.
To resolve this, associate all files of that type with an application that does contain the required AppleScript interface (such as Photoshop or Excel).
In the following steps, JPEG files are associated with Photoshop:
Step 1. In Finder, locate a JPEG file anywhere on your system.
Step 2. Select the file and do one of the following:
- Press Cmd + I
- Choose File > Get Info
The Get Info window appears.
Step 3. Locate the Open With section about half-way down the window.
Step 4. From the list, choose Photoshop.
Step 5. Click Change All... and confirm that you want to make the change to all similar documents.