# print TO notepad



## JohnJ (Apr 25, 2001)

How can I redirect my print jobs to notepad instead of my printer? I have an application that alters my files before it prints them out. I need to store these changes in a file somehow. 
Any Ideas how I can do this?
By the way, the program I am using is dos based but emulated under Windows98.

Thanks,
JohnJ


----------



## giskard (Jun 27, 2003)

If you want to get text out of a DOS session, open it in a window. On the toolbar there is a button labeled "Mark" use this to select the text area, then click the Copy button on the toolbar. Then you can paste it to notepad.


----------



## giskard (Jun 27, 2003)

Look in Start> Help under the index entry "copying text from MS-DOS windows" for more info.


----------



## JohnJ (Apr 25, 2001)

Actually it is a bit more complicated than that. The program is dos based, it does not open a dos window. The only way you can see what it is going to print is to print it. I want to beable to open the "printout" in notepad and not actually print it.

Say for instance, you have a list of part numbers. Some of those are standard and some are non-standard. The standard part numbers do not show up in the file untill you print the file. I need to have access to this printout in notepad for other purposes.

Currently I have to map to a printer to even get it to print (dos based). Instead of mapping to a printer...I need it to print in a file. I hope this clarifies what I am looking for.

Thank you,
JohnJ


----------



## mad-martin (Jul 5, 2002)

this should work from cmd prompt:
PRINT [/D:device] [[drive:][path]filename[...]]
instead of printing it to /D:device print it to a txt file (C:\yourfile.txt)


----------



## giskard (Jun 27, 2003)

Here's a couple of old Dos print utilities that might be what your looking for:

http://www.simtel.net/product.php?url_fb_product_page=49067
http://www.simtel.net/product.php?id=49062&cid=227


----------



## JohnJ (Apr 25, 2001)

I can't use the dos command for two reasons. 1st: I have to print from within the application not thru dos and 2nd: The PRINT command will not work (gives bad command or file name error), I assume this is because I'm not actually running DOS. The other two links will not work either. The first one will not work because you are not printing from within the application (a must) and the second one is not an option because it must load in autoexec.bat upon start up. I need it to be on the fly (as needed basis).

Those were some great ideas though. Just not what I'm looking for. Is there a way to accomplish this thru windows?? (i.e.: capture printer port)

My requirements are to print to a file from within an application (as opposed to a command prompt). The file does not actually exist until you select print and it goes to the printer. That is why I must beable to print within the application.


----------



## JohnWill (Oct 19, 2002)

Gee, why not just install the *Text to File* print driver and just select it to print plain text to a file? It all comes with Windows, just start the new printer wizard and follow your nose! 

Select Generic for the brand, and Text Only as the printer. When you print, it'll ask you where you want your plain text output.


----------



## kilowatt1 (Oct 27, 2001)

Hello JohnJ,

Don't know if this will do it, but it's worth a look.

Go to Start/Settings/Printers. Right clcik on the default printer. Click on Properties/Details. Under "Print to following port", click on the down arrow to expand the options. Select "print to file".

If this works, you can also just click on File/Print while in the program you are using. See if you see an options box for "print to file" there.


Good luck.

Kilowatt


----------



## JohnJ (Apr 25, 2001)

Both those worked except for one problem.....It worked for windows files but when I tried to use my dos based program it acted as if nothing happen. Back to the drawing board.

Currently I have to minimize the application, capture a printer port that supports DOS to LPT1, return to the application, print, end capture.

I think the problem is that each time you print you have to give windows a file name. Is there a way to create a default file so that it does not ask you each time??

Thanks


----------



## giskard (Jun 27, 2003)

PRN2FILE is a tsr, run it before you load the program you want to use and it will capture anything going to the LPT1 port, even in graphical based shells like EDIT.

For example in the Dos prompt type

PRN2FILE [path] [FILENAME GOES HERE.TXT]
(PROGRAM YOU WANT TO RUN).EXE

The only thing is it captures everything going to the printer until you exit to the dos command line and unload it with "PRN2FILE/U" (/U =Unload) and it will append (add) print jobs to the end of the same file.


----------



## JohnJ (Apr 25, 2001)

Well, I tried it again..........

and to my surprise, it did work. You just have to use it a little differently than I expected. I'm not running DOS, just emulations of it. I was trying to open my dos prompt to enter the commands, then minimize that and open my DOS based program in a seperate "window". The program prn2file did not see it over there. It only recognizes what is being printed within that one DOS shell emulation. {which is a good thing}. 
Now I can print my DOS based program by opening it within that DOS shell, minimize that and still print to my printer in Windows, and (since my printer is shared on a network) other people can still print to the printer as well.
It works like a charm!! Even better than I thought it would. This will save me a lot a trouble!! 

THANK YOU EVER SO MUCH!

JohnJ


----------

