How Documents Know Their Parents

Every operating system needs a mechanism to associate documents with the applications that created them. When you double-click a Microsoft Word document icon, for example, it’s clear that you want Microsoft Word to launch and open the document.

So how does macOS know how to find a document’s mommy? It actually has two different mechanisms:

It’s possible to live a long and happy life without knowing anything about these suffixes and relationships. But if you’re prepared for a little bit of technical bushwhacking, you may discover that understanding document-program relationships can be useful in troubleshooting, keeping your files private, and appreciating how macOS works.

Unfortunately, file name extensions aren’t always especially specific. Suppose you’ve downloaded a graphic called Sunset.jpg. Well, almost any program these days can open a JPEG graphic—Photoshop, Pages, Word, Preview, Safari, and so on. How does macOS know which of these programs to open when you double-click the file?

Fortunately, you can decide. You can reassign a document (or all documents of its kind) to a specific program. Here’s the rundown.

Double-clicking a graphics file generally opens it in Preview (More control sliders). Most of the time, that’s a perfectly good arrangement. But Preview has only limited editing powers. What if you decide to edit a graphics file more substantially? You’d want it to open, just this once, into a different program—Photoshop Elements, for example.

To do so, you must access the Open With command. You can find it in three places:

Study the submenu for a moment (Figure 6-19, top). The program whose name says “(default)” indicates which program usually opens this kind of document. From this pop-up menu, choose the name of the program you’d rather open this particular file, right now, just this once.

After opening a TIFF file in, say, Photoshop Elements for editing, you haven’t really made any changes in the fabric of your Mac universe. The next time you double-click that file, it opens once again in Preview.

If you wish this particular file would always open in Photoshop Elements, the steps are slightly different. In fact, there are three different ways:

So much for reassigning one document (or a group of documents) at a time. What if you’re writing, say, a book about macOS, and you’ve been taking a lot of screenshots? MacOS saves each captured screen illustration as a graphics file in something called PNG format. That’s all fine, except that every time you double-click one of these, it opens into Preview, where you can’t paint out unwanted details.

You could reassign all these files, one at a time, to a different program, but your grandchildren would have grandchildren by the time you finished. In this case, you want to tell macOS, “For heaven’s sake, make all PNG files open in Photoshop from now on!”

To make it happen, start by highlighting any PNG file. Choose File→Get Info. (The shortcut menus won’t help you in this case.) Open the “Open with” panel.

From its pop-up menu, choose the program you want to open this kind of document from now on.

Tip

If the one you prefer isn’t listed, use the Other option, which opens the “Choose an application” dialog box so you can navigate to the one you want, as shown in Figure 6-19. Find and double-click the program.

Or, instead of choosing Other, you can also choose App Store. It’s Apple’s way of saying, “Hey—if you don’t have a program that can open this document, maybe you should just go buy one right now!”

This time, follow up by clicking Change All beneath the pop-up menu. (This button is dimmed until you’ve actually selected a different program from the pop-up menu.) Confirm by clicking Continue or pressing Return.

From now on, double-clicking any similar kind of document opens it in the newly selected program.