Microsoft KB Archive/153759

= ACC: Print To File Option Inserts Unsupported Characters =

Article ID: 153759

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q153759



Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
When you print to a file by using the Print To File option in the Print dialog box, the file created with a Generic/Text Only printer driver contains characters not supported by Microsoft Windows 95.



RESOLUTION
There are two ways to work around this behavior. One way is to use the Print To File option in the Print dialog box, and then to edit the file manually by deleting the unsupported ASCII characters. However, the recommended way is to output the file to a text file. The following steps demonstrate this method:

 Open the sample database Northwind.mdb. Click the Reports tab, and then click New. In the New Report dialog box, click Design View, base the new report on the Categories table, and then click OK. If the Field List box is not displayed, click Field List on the View menu,. Drag the CategoryName field to the report's detail section. Close and save the report as Report1.  Click the Macros tab, click New, and create the following macro:

<pre class="fixed_text">     Macro Action OutputTo

Macro1 Actions --     Object type: Report Object name: Report1 Object format: MS-DOS Text Output file: C:\Test.txt Auto Start: No                       </li> Close and save the macro as Macro1.</li> On the Tools menu, click Macro. In the Run Macro dialog box, select Macro1, and then click OK.</li> Open the C:\Test.txt file in Notepad or another text editor. Note that there are no unsupported ASCII characters in the Test.txt file and that the spacing between the controls is close to what it was in Microsoft Access Print Preview.</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
The text file that the Print To File option creates contains unsupported ASCII characters in Microsoft Windows 95, and the formatting of the report does not resemble what you see in Print Preview in Microsoft Access.

Steps to Reproduce Behavior

 * 1) Open the sample database Northwind.mdb.
 * 2) Click the Reports tab, and then click New. In the New Report dialog box, click Design View, base the new report on the Categories table, and then click OK.
 * 3) If the Field List box is not displayed, click Field List on the View menu,.
 * 4) Drag the CategoryName field to the report's detail section.
 * 5) On the File menu, click Print.
 * 6) In the Print dialog box, select the Generic/Text Only printer driver. After selecting the Generic/Text Only driver, click Print To File, and then click OK.

NOTE: If you do not have the Generic/Text Only driver installed, you must install the driver. Steps to install the Generic/Text Only printer driver are outlined in the "Steps to Install Printer Driver in Windows 95" section.
 * 1) When prompted, name the file, and then click OK.
 * 2) After the file has been saved, open the file in Notepad or another text editor. Note that there are unsupported characters. Also note that the file's formatting does not resemble the report's spacing in Microsoft Access.

Steps to Install Printer Driver in Windows 95

 * 1) Click the Windows 95 Start button, point to Settings, and then click Printers.
 * 2) Double-click the Add Printer icon. The Add Printer Wizard starts.
 * 3) Click Next in the Wizard startup screen.
 * 4) Click Next again.
 * 5) When prompted for a printer type, select Generic under the Manufacturers heading, and Generic/Text Only under the Printers heading. After selecting the manufacturer and printer, click Next.
 * 6) Click Next to accept the default printer port.
 * 7) Click Next to accept the default printer name and settings.
 * 8) Select No to print a test page, and then click Finish to have the wizard install the files for a Generic/Text Only printer driver.

<div class="references_section">