How to View/Print ".prn" Files?

SidBord

Active Member
Joined
Aug 23, 2004
Messages
346
I just started playing around with the Print commands in Visual Basic.
When I did a successful "Print to File" it created a file with an extension ".prn". How can I view/print this file? I can't seem to find a program that will open it.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
SidBord said:
I just started playing around with the Print commands in Visual Basic.
When I did a successful "Print to File" it created a file with an extension ".prn". How can I view/print this file? I can't seem to find a program that will open it.

prn is a text file and can be opened by Excel by changing the file open window to look at "Files of Type" Text files.....

You should also be able to print by opening Windows Exlporer and doing a right mouse click (menu key) on the prn filename and clicking Print on the resulting menu.
 
Upvote 0
Thanx for the info. After I had made the post, it occurred to me that maybe I could use a print option on the dropdown list. But I didn't know about the text characteristic. I tried opening it with Note Pad and while it DID open it, it was virtually unreadable because of all the control stuff present.
 
Upvote 0
Hi SidBord:

In my experience, the Print To File command generates a binary file, and is to be used when you want to print the file to a specific printer later (because the specific printer may not be available at that time or location, or for whatever other reason).

Then when you finally do want to print the file to that specific printer, you copy the file as a binary file to the printer as in the following command line when the file is being copied to the printer attached to LPT1 ...

copy filename /b LPT1

If I have misunderstood the question, my apologies!
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top