Take control of how files open

It’s happened to all of us: A colleague sends an image that you’d like to edit, but when you double-click on it, Preview launches instead of Adobe Photoshop. Or, you save a text-only document from Microsoft Word and when you later open it from the Finder, it launches TextEdit instead.

Before OS X 10.6 (Snow Leopard), when you double-clicked on a file it would always open in the application that created it. Now, native documents (that is, .doc or .docx files for Word, .indd files for Adobe InDesign, and so on) still open in their parent applications, but common file types—for instance, .txt, .jpg, and .html—open in more generalized applications, such as Apple’s TextEdit, Preview, or Safari.

Whether or not you like Snow Leopard’s new approach, you can always control which application opens a file. The Open With command and its variations let you temporarily override, or completely reassign, where your documents open—as long as you choose an application that knows how to interpret the document’s information. And, if you’re working in OS X 10.5 (Leopard), where a double-clicked file always looks for its creator instead of a pinch-hitter, these commands are still very useful when you want to open documents with something other than their parent applications.

Open With: Just this document, just this time

A friend has e-mailed a rough draft of a document created in TextEdit and saved in Rich Text (.rtf) format. You want to edit it in Microsoft Word. Sure, you can use Word’s Open command (as long as you set the Enable pop-up menu in its Open dialog box to All Readable Documents), but Word isn’t running yet, and you’re looking at the document’s icon in your Downloads folder. Just select the icon, choose File -> Open With, and select Microsoft Word from the submenu. Or, Control-click (right-click) on the file’s icon and choose Open With -> Microsoft Word from the contextual menu. This time the file will open in Word. The next time you double-click on it, it will revert to opening in TextEdit.

Open Mail attachments
You can control what application your file opens in, even when the file is an e-mail attachment. In Mail, Control-click on the attachment's icon to see a contextual menu.
The time-honored tradition of a “force open” still works, too: dragging a document onto an application’s icon in the Dock or in the Applications folder has the same result as using the Open With command.

Tip You don’t have to save an e-mail attachment first to open it in something other than its default application. If you’re using Apple’s Mail, you can Control-click (right-click) on the attachment’s icon in the message window to see a contextual menu that includes the Open With command.

Always Open With: Just this document, from now on

Snow Leopard opens JPEG images in Preview. You may find this a perfectly good solution most of the time if all you want to do is flip or rotate the image, or perhaps save it in a different format such as TIF or PNG. But in this case, you want to open the JPEG in Photoshop for more advanced alterations and you know you’ll be editing the image repeatedly.

Select the file in the Finder. Hold down the Option key and choose File -> Always Open With, and then select Adobe Photoshop from the submenu. (Alternatively, you can open the File menu and then press Option, which changes the Open With command to Always Open With.) From now on, this file will open in Photoshop while other JPEGs continue to open in Preview.

You can also access the Always Open With command from a Finder’s contextual menu, but you must press Option after you’ve opened the contextual menu to change the Open With command to Always Open With. Pressing Option before or as you open the contextual menu doesn’t alter the command.

Change All: Every document like this, always

The Info window
In Snow Leopard, HTML files open in your browser no matter where they were created. Select a different application from the Open With menu in the Info window of any HTML file and click Change All to make all HTML files open in that program.
Personally, I like all JPEGs to open in Photoshop. Even if the application is overkill for what needs to be done, I usually have it open already, and I have all sorts of keyboard shortcuts and macros that speed things along. In your case, perhaps you use Bare Bones Software’s BBEdit or Adobe Dreamweaver to create Web pages, and you’d rather your HTML files open in that application than in Safari (or the default browser that you’ve specified in Safari’s preferences).

It’s easy to specify a new default application for a document type that can open in any of several applications. Working in the Finder, select the icon of a file of that type and choose File -> Get Info. In the Info window, expand the Open With section if necessary, and select your preferred application from the pop-up menu. Click the Change All button and then click Continue in the confirming dialog box. Now this file type will always open in the application you prefer.

Mac author Sharon Zardetto has finally torn herself away from reading on her iPad and gotten back to writing about the finer points of using the Mac.

To comment on this article and other Macworld content, visit our Facebook page or our Twitter feed.
At a Glance
Shop Tech Products at Amazon