REQ: Dos command to map to local printer

  • Thread starter Thread starter John
  • Start date Start date
J

John

I'm having to edit a macro that effectively prints a screen on one of
our mainframe systems. We use Windows 2000 Pro for our PCs, Attachmate
7 as the emulator and the mainframe is an AS400.

I can get the macro to work perfectly if I point it at a network
printer but I dont know what syntax and code to use to get it to print
using a local printer connected to the LPT1 port of the windows PC.

Extract of macro text is :

Open the printer. To print to a file, set FileName$ to a file name.
' In this example, "\\TES\L4S_HP" is a network printer name.
' Change this to your printer name.

FileName$ = "\\bmhsms01\bmh_prt_09"
Open FileName$ For Output as filenum%

' Print the screen with a form feed
Print # filenum%, screenbuf$; Chr$ (12)

'Close printer
Close filenum%




As you'll no doubt appreciate the network printer is
\\bmhsms01\bmh_prt_09 but how do I specify a locally connected printer
??

Any help would be much appreciated

John
 
Try with FileName$="LPT1:"
or with FileName$="PRN:"

Hi,
Davide.

Thanks Davide, I haven't had a chance to try it yet as I'm out of the
office but I appreciate your help.

John
 
Back
Top