XL2000: Printer Name Not Listed in Print Dialog Box

ID: Q211391


The information in this article applies to:
  • Microsoft Excel 2000


*********************************************************************
**                           - WARNING -                           **
**     THE INFORMATION BELOW IS PRELIMINARY AND HAS NOT BEEN       **
**     CONFIRMED OR TESTED BY MICROSOFT. USE ONLY                  **
**     WITH DISCRETION.                                            **
*********************************************************************
 
IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

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 may occur when you have just one or two printers installed.


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 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.


WORKAROUND

Perform either of the following workarounds to correct this problem.

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.

Windows 95

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

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:

    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 with the correct information.

Rename the Win.ini to Win.old, and reinstall Windows 95 or Windows 98. Windows detects that you are reinstalling, and a dialog box will appear with the title Run Setup Again? The dialog box will give 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 you are troubleshooting, you can copy and paste application-specific sections from the Win.old file.

Workaround 2: Rebuild the User.dat Registry

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

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
    cd\windows
    attrib -s -h -r user.dat
    where windows is the name of your Windows folder.


  2. Type the following line to rename the User.dat file:
    ren user.dat user.old


  3. Restart Windows as you normally do.


Additional query words: XL2000

Keywords : kbprint kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: December 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.