I've asked this question quite a few times - but no answer works.
I use AutoCAD to create plot files which I send either to a laser printer or to a HP inkjet plotter and these are mapped to different ports or print queues through Novell 3.12.
I store in a separate file a list of the plot files together with a number referring to how it was printed.
I want to be able to automatically send the plot file to the correct printer, but so far no solution works.
Shell Environ$("comspec") & " /c copy /b " & c$ & " LPT" & FnStr$(i&) & ":"
This program is set to run in MS-DOS mode and cannot run while other programs are running. All other programs will close if you choose to continue.
f& = FreeFile
Open c$ For Input As f&
r$ = Input$(LOF(f&),f&) & vbFormFeed
i& = OpenPrinter(p$, j&, 0)
If i& = 0 Then MsgBox "unable to open " & p$ & "!", vbOKOnly + vbExclamation + vbSystemModal: Exit Function
.pDocName = a$
.pOutputFile = vbNullString
.pDataType = vbNullString
i& = StartDocPrinter(j&, 1, doc)
WritePrinter j&, r$, Len(r$), k&