I use Zebra Printer to Print 2D Bar code lables. In Native Navision in the code I create and save the file in my hard drive then I use a shell command to send the file to the printer and have it print 2D Bar code:
LabelFileName := '\\SAM-THINK\E\' + "Bearing Bar Order"."Document No." + '.txt';
ReturnCode := SHELL(ENVIRON('COMSPEC'),'/c type ' + LabelFileName + ' > LPT1');
The SHELL command is no longer valid in NAV 2015 RTC!! How can I communicate with the Printer? How can I send the text file to the Zebra printer so It will print 2D Bar Codes?
The Zebra Printer is a USB Printer.
Any Help?
0
Answers
Not sure if it's the right syntax, I haven't upgrated a Zebra implementation yet.
Oli
Thanks again oki and geordie
Name DataType Subtype
wSHShell Automation 'Windows Script Host Object Model'.WshShell
IF ISCLEAR(wSHShell) THEN BEGIN
CREATE(wSHShell,FALSE,ISSERVICETIER);
wSHShell.Run('cmd.exe /C type ' + LabelFileName + ' > LPT1');
CLEAR(wSHShell);
END;
Thanks to all who replied to my post and helped me..
Name DataType Subtype
wSHShell Automation 'Windows Script Host Object Model'.WshShell
IF ISCLEAR(wSHShell) THEN BEGIN
CREATE(wSHShell,FALSE,ISSERVICETIER);
wSHShell.Run('cmd.exe /C type ' + LabelFileName + ' > LPT1');
CLEAR(wSHShell);
END;
Thanks to all who replied to my post and helped me..