F
FGM
Windows2000 excel 2002
This may not directly be an excel problem but maybe others do something like
this from excel data to a dos program and back to excel. Appreciate any
help. thanks..
I am writing data to a text file the DNL.in file below. Then I create the
bat file below. The bat file runs an old DOS program. It works from my
computer. The PtintText_P printer creates a file on the file server that is
a text file of the dos program output. Then I import the output back into
excel.
My problem is that I want this to work on my bosses computer. I can turn on
and off the laser printer that we share from his computer. Should I be able
to direct him to the TextPrinter on my computer? When I try it from his
computer I get a printer error. To direct his printing to the laser printer
I do "Net use LPT1 \\EMP1\Laser" and it works fine.
'write the bat file
Open "C:\Programs\tpm\dnl.bat" For Output As #1
Print #1, "del p:\pfile.prn"
Print #1, "Net use LPT1 /delete"
Print #1, "Net use LPT1 \\EMP1\PrintText_P"
Print #1, "cd \"
Print #1, "cd\programs\tpm"
Print #1, "C:\programs\tpm\DNLROAD < c:\programs\tpm\DNL.in"
Print #1, "copy p:\pfile.prn " & strOutPath
Close #1
This may not directly be an excel problem but maybe others do something like
this from excel data to a dos program and back to excel. Appreciate any
help. thanks..
I am writing data to a text file the DNL.in file below. Then I create the
bat file below. The bat file runs an old DOS program. It works from my
computer. The PtintText_P printer creates a file on the file server that is
a text file of the dos program output. Then I import the output back into
excel.
My problem is that I want this to work on my bosses computer. I can turn on
and off the laser printer that we share from his computer. Should I be able
to direct him to the TextPrinter on my computer? When I try it from his
computer I get a printer error. To direct his printing to the laser printer
I do "Net use LPT1 \\EMP1\Laser" and it works fine.
'write the bat file
Open "C:\Programs\tpm\dnl.bat" For Output As #1
Print #1, "del p:\pfile.prn"
Print #1, "Net use LPT1 /delete"
Print #1, "Net use LPT1 \\EMP1\PrintText_P"
Print #1, "cd \"
Print #1, "cd\programs\tpm"
Print #1, "C:\programs\tpm\DNLROAD < c:\programs\tpm\DNL.in"
Print #1, "copy p:\pfile.prn " & strOutPath
Close #1