By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

Writing EPL/ZPL file directly to the Printer ... Any Clues

P: 113
I am involved with a labelling application, which at the moment prints labels on thermal printers, via the windows driver. This can be frustratingly slow. Most thermal printers have an ASCII command set which enables the simple copying of files directly to the printer port. The result is instant printing of labels. A much more satisfactory result in a busy environment. The command set allows the setting of variables on template files, and indeed allows the uploading and storage of template files on the printer. Once installed those templates can be printed with a few bytes of data passed to the printer, including the variables. Has anyone "Been there done this", as I would like some help, re the most efficient way of achieving this.
Basically I wish to create a text file, using the printers command language and using code within access, set the variables, I then wish to issue a DOS copy to COM2 command, which I do not seem to be able to find much about in VB help index.
Nov 28 '06 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 15k+
P: 31,656
Does the Shell command hold out any hope?
Using it with Copy does involve a complicated call using CMD.Exe or Command.Com.
Shell Function

Runs an executable program and returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero.



The Shell function syntax has these named arguments:

Part Description
pathname Required; Variant (String). Name of the program to execute and any required arguments or command-line switches; may include directory or folder and drive. On the Macintosh, you can use the MacID function to specify an application's signature instead of its name. The following example uses the signature for Microsoft Word:
Shell MacID("MSWD")
windowstyle Optional. Variant (Integer) corresponding to the style of the window in which the program is to be run. If windowstyle is omitted, the program is started minimized with focus. On the Macintosh (System 7.0 or later), windowstyle only determines whether or not the application gets the focus when it is run.
Nov 28 '06 #2

Expert Mod 15k+
P: 31,656
For help on using the CMD.exe command type CMD /? from a Command prompt. You're looking to use the /C switch with COPY.
Nov 28 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.