Associating a File Type with an Application

To open an application when you double-click a related document file, the file's type must be defined in the Registry. If the file type is defined in the Registry, it appears in a list of file types that you can associate with an application.

For information about associating a file type with an application so that the application runs when you double-click a file, see online Help.

If a file type has been associated with an application, you can reassociate the file type to a different application.

To reassociate a file type

  1. Double-click My Computer, and then click the View menu.
  2. Click Options, and then click the File Types tab.
  3. Click the type of document you want to reassociate, and then click Edit.
  4. In the Actions list, click Open, and then click Edit.
  5. In the Application Used To Perform Action area, type the path to the application you want to associate with the file type.

Some applications, such as Microsoft Word, associate multiple extensions with a file type. For example, a Microsoft Word document is associated by default with both a .DOC and an .RTF extension. This can cause problems if a user wants to change which application opens a particular file. To reassociate a file type with an application under these conditions, you must delete all extensions registered to that application, and then re-associate each file type with an application. In addition, you must redefine Open, Print, and DDE commands for each file type. To do this, in My Computer or Windows Explorer, click the View menu, click Options, and then click the File Type tab.

If you click New in the File menu in Windows Explorer or in the context menu, a list of objects appears, such as Folder or Microsoft Excel 5.0 Worksheet. Clicking an object creates a new object in Windows Explorer or on the desktop. You can add an object to this list by adding a key called ShellNew to the corresponding file extension in the Registry for the related filename extension:


Hkey_Classes_Root\.ext

After creating the ShellNew key, you need to add a new string value called FileName with a data value that equals the path name to a template file in the ShellNew subdirectory. For example:


FileName="c:\windows\shellnew\excel.xls"

Tip In the Open dialog box in a Windows-based application, you can request that multiple file types be displayed by separating the file types with a semicolon. For example, to see .DOC, .TXT, and .RTF files in an Open dialog box you would type *.doc; *.txt; *.rtf.