If I open a dos prompt from Windows every thing is fine using the command
'Copy C:\autoexec.bat lpt1' however if I try and use FileCopy
"C:\Autoexec.bat","LPT1" from within Access the LPT1 parameter causes an
error.
Also if I try and use the shell command to run a batch file containing the
command 'Copy C:\autoexec.bat lpt1' the lpt1 parameter is not accepted even
though it does work when typed in directly or run from a DOS window.
Any ideas why or how else I can achieve the above via another route? I'm
stumped at the moment.
TIA
Gary.
Michael
"Rachel Larkin" <rachel...@virgin.net> wrote in message
news:E9mL5.30247$h%4.24...@news2-win.server.ntlworld.com...
It just work fine for me. I don't remender if it's a slash or a back slash!!
Jean-Eric
"Rachel Larkin" <rachel...@virgin.net> wrote in message
news:E9mL5.30247$h%4.24...@news2-win.server.ntlworld.com...
Sub printFile(vStrPath As String, vStrPrinterPort As String)
Dim lngFileNumber As String
Dim strPrintStream As String
strPrintStream = String(FileLen(vStrPath), vbNullChar)
lngFileNumber = FreeFile()
Open vStrPath For Binary As #lngFileNumber
Get #lngFileNumber, , strPrintStream
Close #lngFileNumber
lngFileNumber = FreeFile()
Open vStrPrinterPort For Output As lngFileNumber
Print #lngFileNumber, strPrintStream
Close #lngFileNumber
End Sub
Warning ... this prints the file "AS IS" /// so if any lines are too long they
run off the page ... they are not wrapped.
rachel...@virgin.net (Rachel Larkin) wrote in
<E9mL5.30247$h%4.24...@news2-win.server.ntlworld.com>:
>I am trying to put a new front end on a plot file database to
>replace an Old Visual Basic program. All I need to do is copy
>a file from a server drive to the LPT port however Access 97
>will not let me?
--
Lyle
http://www.cyriv.com/