Viewing a file in Preview... now how do I open it?

If I have a file open in Preview, is there a way to open it in the default application for that file type?

It seems like there should be a way. The app name ‘Preview’ suggests the app is something you use as an initial step, before opening/working on the file fully.

Eg if I’m viewing a TIFF file in preview, is there a way to open the file in Photoshop (the default application for tiff files on my system).

1 Like

There is an option in the Quick Look feature of Finder. There’s a button with its own keyboard shortcut.

For context, I have a number of shortcut cheat sheets for various apps, and I use keyboard maestro to open them in Preview when I need them.

Quite often I have one open and realise I want to change it, so I want to go from Preview → Photoshop.

1 Like

I don’t think there its anything built in, but it is relatively straight forward to add an automation to do it. Just a line of AppleScript seems to do the trick in my testing.

tell application "Preview" to do shell script "open '" & path of front document & "'"

I wouldn’t say that there should be a (built-in) way. A preview is a step, but not necessarily an intermediate step. It could just as easily be considered an end point on a branching process - preview OR export for example. As it is, Preview is simply the name of the app because that’s how it started out - just previewing files. It actually does a whole lot more than it originally did these days. So much so, that there’s even a whole book about it!

You could create a service in Automator with an AppleScript step (which you could assign a keyboard shortcut to), an AppleScript in the Preview AppleScript folder, a Shortcuts shortcut with a keyboard shortcut, etc.

However, since you note you are already using Keyboard Maestro to get files into Preview, perhaps Keyboard Maestro would make most sense for getting files reopened outside of Preview? A macro with the AppleScript above in it can be created, put in an ‘enabled in Preview only’ macro group if necessary (not essential), assigned a trigger, etc.

You could enhance the AppleScript further if you also wanted to close the file in Preview, but it wasn’t clear if that was a requirement in the context of your three posts.

Hope that helps.


Thanks sylumer, that’s amazingly helpful. Thanks for taking the time to explain it all.

I’ve used your keyboard maestro method and it works great, thanks!

1 Like

I know very little about AppleScript, but it seems like I should learn some.
I managed to add an extra line to close the preview, as you suggested.

1 Like

If you install this plugin action:

It basically does the half of the AppleScript that sylumer quoted, and returns the path of the front Preview document.

Then you can just pass that path to the Open a File action to open it with the default application (or a specific application if you prefer).

1 Like