Opening Documents in Mac OS X

Using most applications involves opening documents, and although opening documents using Mac OS X applications is similar to opening documents in applications under previous versions of the OS, some substantial differences exist. Mac OS X offers several features that applications can use to make opening documents faster and easier.

As with previous versions of the Mac OS, there are several ways in which you can open documents:

  • Select the document's icon in a Finder window and select the Finder's Open command (press graphics/mac.gif-O).

  • Double-click a document's icon in the Finder.

  • Single-click a document's icon on the Dock.

  • Drag a document icon or alias onto an application's icon or alias (on the desktop, in a Finder window, or on the Dock).

  • Select the document's icon or alias and press graphics/mac.gif-down arrow.

  • Open the document using an AppleScript or other macro.

  • Open a compatible application and use its Open command to open a document.


If you see the document's icon on the Dock, an alias to that document has been placed there. If you see a thumbnail of the document's window on the Dock, that document is open and its window has been minimized. In either case, single-clicking the icon causes the document to open so you can work on it.

Most of these techniques are simple. However, because the Open dialog box has improved dramatically for Mac OS X version 10.3, it is worthy of some attention. Also, you need to understand how you can associate documents with specific applications so you can determine which application opens when you open a document.

Using the Mac OS X Open Dialog Box


Finally, under Mac OS X version 10.3, Open dialog boxes have been harmonized with Finder windows so behavior of these windows, which serve a similar purpose (that being to enable you to access files and folders), is similar. And because Finder windows have been greatly improved for version 10.3, Open dialog boxes are also greatly improved.

As under previous versions, different applications can add features to the Open dialog box for specific purposes, but most Open dialog boxes offer a similar set of features.


Many dialog boxes, although not called Open, are actually the Open dialog box with the name modified to suit the specific purpose at hand. These dialog boxes have names such as Choose a Picture, Choose a File, and so on. However, they all work in basically the same way and offer similar features as the Open dialog box.

A typical Open dialog box is shown in Figure 6.14.

Figure 6.14. This Open dialog box, from Microsoft Word, is typical of those offered by Mac OS X applications. The similarity to Finder windows is more than skin deep.


If you read through earlier chapters in this book, you are quite knowledgeable of Finder windows, and Open dialog boxes work like Finder windows in many ways. The Places sidebar enables you to choose the location from which you want to open a file. When you select a place, its contents appear in the center pane of the window. You can choose to view this pane in the List view or the Columns view; again, these views are the same as when you are viewing Finder windows. You can use the List View or Columns view button to change the view used in the dialog box. You can use the Forward and Back buttons to move back to locations you viewed previously.

To learn how to work with Finder windows, see Chapter 3, "Viewing and Navigating Mac OS X Finder Windows," p. 47.

The location shown in the Location pop-up menu is the currently selected folder whose contents are displayed in the pane. For example, if Documents is shown in the Location pop-up menu, the Documents folder is selected and its contents are displayed. If you have selected the Columns view, the contents of the location selection on the Location pop-up menu appears in the leftmost column.

You can also use the Location pop-up menu to quickly access many areas of your Mac, from your current location up to the volume on which Mac OS X is installed and the folders you have most recently opened (see Figure 6.15).

Figure 6.15. The Location pop-up menu in the Open dialog box has two sections; the upper section enables you to move "up" from your current location and the lower pane enables you to choose a place you have been recently.


If you use the List view, to open a file or folder, simply move to it, select it, and click Open or double-click the file or folder you want to open. If you use the Columns view and select a folder, that folder becomes selected and you see its contents in the pane to the right of the folder. You can then select a folder or document it contains. In either view, you can select a document and double-click it or click Open.

You can change the Open dialog box in several ways, including the following:

  • Use the Pane Resize handle to make the Places sidebar wider or narrower.

  • Use the resize handle to make the dialog box larger or smaller.

  • Click the Maximize button to make the dialog box its maximum size.


    The Maximize button is not included in the Open dialog box under all applications?typically, only Cocoa applications include this feature.

  • Drag the dialog box around the screen. Because the Open dialog box is an independent window, you can move it around on the screen.

The Open dialog box might contain application-specific controls. For example, in Figure 6.15, you saw the Enable pop-up menu that lets you choose the type of Office documents you want to open. In the Application Tools pane, you will also see different tools depending on the application in which you are working. As you locate and open files or documents, you should be aware of these additional options and apply them as needed.

Determining the Application That Opens When You Open a Document

As with previous versions of the Mac OS, the system determines which application should be used when you try to open a file (other than when you open a document from within an application using its Open command, of course). Typically, the document's creator opens if it is installed on your Mac, such as Microsoft Word opening a .doc file.

Several factors determine which application opens when you open a document, including the document's file type and creator information, as well as the file's filename extension. Mac OS X does a good job evaluating these properties to ensure that the correct application opens.

However, there might be times when you want to use a different application than the one the system selects, or you might not have the application that was used to create the document. In such cases, you can choose the application in which a document opens.

You can also change the association for all files of a specific type to determine which application opens when you open any file of that type.

There are two ways to associate document types with the applications used to open them. One is by using the Get Info window; the other is by using a document's contextual menu.

Using the Get Info Window to Associate Documents with an Application

You can use the Open with section of the Info window to determine which application is used to open a file:

  1. Select the document you are interested in and press graphics/mac.gif-I. The Info window appears.

  2. Expand the Open with section. The application with which the document is currently associated is shown on the pop-up menu. The associated application is called the default application?the text (default) appears after the application name.

  3. Open the pop-up menu. You will see all the applications the system recognizes as being able to open the document, along with the Other selection (see Figure 6.16).

    Figure 6.16. This menu lists all the applications Mac OS X thinks you can use on the document.


  4. If one of the listed applications is the one you want to associate with the document, choose it on the menu. The document is opened with that application the next time you open it.

  5. If you want to select an application that is not shown on the pop-up menu, select Other. You will see the Choose Other Application dialog box (see Figure 6.17).

    Figure 6.17. You can use the Choose Other Application dialog box to select applications to open a document, even if Mac OS X doesn't recommend them.


    The Choose Other Application dialog box moves to the Applications directory automatically, and by default, it shows you only the recommended applications, which are those that Mac OS X recognizes as being compatible with the document. This set of applications might or might not be the same as you saw on the pop-up menu in the Info window. Mac OS X recognizes that some applications that can open files of that type might not really be intended to work with files of that type and so doesn't show them in the pop-up menu. However, they might be active in the Choose Other Application dialog box. Applications Mac OS X doesn't think can be used at all are grayed out.

  6. To make all applications active, select All Applications from the Enable pop-up menu.

  7. Use the dialog box's controls to move to the application you want to select, select it, and click Add. After you click Add, you return to the Info window and the application you selected appears in the window. That application is used the next time you open the file.


If you want to permanently change the application used to open the document, check the Always Open With box.


Just because you told Mac OS X to use a specific application, even if it is the one that Mac OS X recommended, that doesn't mean you will actually be able to open the document with the application you select. If you try to open the document and generate error messages, you need to go back and select an application that can handle the type of file you are working with.

If you choose an application that Mac OS X isn't sure can open files of the selected type, you see a warning saying so in the dialog box after you select the application. You can proceed even when you see the warning, but you might get unexpected results.


Even though Mac OS X tries to recommend applications that are appropriate for the selected document, it doesn't always do a great job. For example, it doesn't usually list a Classic application even when that application is the best choice for the selected document. In those situations, use the All Applications command on the Enable pop-up menu to add the application you want to use for the document.

You can also use the Info window to associate all files of a specific type with an application. Here's how:

  1. Use the previous steps to associate a file of the type you want to associate with an application. After you have changed the application association, the Change All button becomes active.

  2. Click the Change All button. You will see a warning dialog box that explains what you are about to do; for example, it lists the document types you are changing and the application with which you will associate documents of that type (see Figure 6.18).

    Figure 6.18. This warning dialog box provides the information you need to ensure that the file association you are creating is the correct one.


  3. If you are sure that you want to make the change, click Continue. All files of the selected type become associated with the application you selected. The application you selected becomes the default application for all documents of that type.

Using a Contextual Menu to Open a Document with a Specific Application

You can also use a file's contextual menu to determine which application is used to open it by doing the following:

  1. Select a document that you want to open with a specific application.

  2. Hold down the Control key and click the file to open its contextual menu.

  3. Select Open With. Another menu appears that lists all the applications the system recognizes as being compatible with the document you are trying to open. The application currently associated with the document is marked as the default (see Figure 6.19).

    Figure 6.19. This menu provides the same controls as the Open with section of a document's Info window.


  4. Select the application with which you want to open the document from the list. If you want to use an application that is not on the list, select Other and use the Choose Other Application dialog box to move to and select the application you want to use. (See the preceding section for detailed information on how this dialog box works.) The document opens in the application you selected.

When you use this technique, the document is associated with the application only if you save the document from within that application. If you simply open it and view it, the previous application continues to be associated with the document.

If you want the file to always be opened with a different application, even if you don't make any changes to it, open the contextual menu and then press the Option key. The Open With command becomes the Always Open With command. After you choose an application, the file is associated with that application and always opens in it.


Note that setting an application for all files with a specific type and creator combination does not override any documents for which you have set a specific application. For example, suppose you set the application to use for a specific document. Then, using another document, you change the application used for documents of that type and creator to be a different application. The first document would still open with the specific application you selected previously.

Using Filename Extensions to Associate Documents with Applications

You can also try to change the application associated with a specific document by changing the document's filename extension. For example, to associate QuickTime Player with a document, you would change its extension to .mov. When you do so, the file's icon might change to reflect that extension and the document opens with the application that extension is associated with. But this doesn't always happen. Do the following:

  1. Edit the filename extension of the file you want to associate with an application so the extension is unique to that application. For example, you can change .rtf to .doc to associate a file with Microsoft Word.

    The filename extension you use must be specific to an application for this to work. For example, some filename extensions, such as .tiff, can be associated with many applications. You must use the Info window or contextual menu to change the association for such files.

    A warning dialog box appears (see Figure 6.20). In this dialog box, you see two buttons: One keeps the file's current filename extension, and other causes the new one to be used.

    Figure 6.20. When you change a filename extension, you have to confirm the change by clicking the Use button in a dialog box like this one.


  2. Click the Use button; the filename extension is changed. The file is associated with the application currently associated with files that have the filename extension you chose to use. (If you click the Keep button, nothing is changed.)

Changing the filename extension does not override a selection you have made with the Info window. If you associate an application with a document by using the Info window tools and then subsequently change the filename extension, the choice you made with the Info window overrides the filename extension and determines the application used to open that document.

    Part I: Mac OS X: Exploring the Core
    Part III: Mac OS X: Living the Digital Life