Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

OFF: Printer Name Not Listed in Print Dialog Box


View products that this article applies to.

Symptoms

When you try to print your workbook, the printer name does not appear in the Name box in the Print dialog box. However, the same printer does appear in the Print dialog box of other Microsoft Office programs. This problem may occur when you have just one or two printers installed.

↑ Back to the top


Cause

This problem may occur because Microsoft Excel cannot read the printer information if either of the following conditions is true:
  • The Devices section of the Win.ini file contains incomplete or incorrect information.

    -or-

  • User information in the Windows registry is corrupted.
Note that if you remove the Win.ini file, or if it becomes corrupted, and you then restart Microsoft Windows, a new Win.ini file is created. However, the new Win.ini file contains only the Desktop and/or Embedding sections. The Devices section is missing.

↑ Back to the top


Workaround

To work around this problem, use either either of the following workarounds.

Workaround 1: Repair the Win.ini File

Use any of the following methods to correct this problem with the Win.ini file.

Method 1: Reinstall All Printer Drivers

Because one damaged printer driver can sometimes have damaging side-effects for the other drivers installed, remove and then reinstall the printer driver. In some cases you may need to remove all of the installed printers and then reinstall them. This will re-create the required information for the Devices section, as well as write the correct entries for the Ports, Printer Ports, and Windows sections in the Win.ini file.

For information about how to install a new printer driver, use the appropriate method for your operating system.

Microsoft Windows 95

Click the Search button in Windows 95 Help and type:
printer drivers, installing

Microsoft Windows 98

Click the Search button in Windows 98 Help and type:
printer setup

Method 2: Correct the Win.ini File

Locate the Win.ini file and correct the Devices section. To do so, follow these steps:
  1. Open the Win.ini file in Notepad. The Win.ini file is located in your Windows folder.
  2. In the Win.ini file, find the [Devices] section.
  3. The Devices section should list the friendly name of the printer, followed by an equal sign, the driver name, a comma, and then the port or network path. The following is a sample [Devices] section:
    [Devices]
          HP LaserJet 4/4M=HPPCL5MS,LPT1:
          HP LaserJet IIISi=HPPCL5MS,\\Server\Sharename
    						
    Remark the line by placing a semicolon before the printer name as in the following example:
          ;HP LaserJet 4/4M=HPPCL5MS,LPT1:
    						
    Save the Win.ini file and close Notepad, and then reinstall the printer driver to create the new entry.

Method 3: Create a New Win.ini File

If neither Method 1 nor Method 2 resolves your problem, you can create a new Win.ini file that contains the correct information.

To do this, rename the Win.ini file to Win.old, and reinstall Windows 95 or Windows 98. Windows detects that you are reinstalling, and displays a dialog box with the title Run Setup Again? The dialog box gives you two options. Select the first option (to restore Windows files that are changed or corrupted) and reinstall Windows.

This method re-creates a new, complete Win.ini file with all of the required sections.

If the new Win.ini file seems to correct the problem that you are troubleshooting, you can copy and paste application-specific sections from the Win.old file.

Workaround 2: Rebuild the User.dat Registry

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To correct this problem with the Windows registry file, User.dat, follow these steps:
  1. Restart Windows in MS-DOS mode. At the MS-DOS prompt, type the following lines
    cd\windows
    attrib -s -h -r user.dat
    attrib -s -h -r user.da0
    where windows is the name of your Windows folder.
  2. Type the following lines to rename the User.dat file:
    ren user.dat user.old
    ren user.da0 user.dat
  3. Restart Windows.

↑ Back to the top


Keywords: KB211391, kbprint, kbprb

↑ Back to the top

Article Info
Article ID : 211391
Revision : 5
Created on : 1/23/2007
Published on : 1/23/2007
Exists online : False
Views : 394