Views:

Product: LABELVIEW, CODESOFT

Version: LABELVIEW Gold 2014 and Newer, CODESOFT Enterprise 2014 and newer

 

1. Open your starting label.
 
2. Right-click an empty area of the label and select Properties.

3. Select Visual Basic Scripting.

4. Select Activate the call of events.

5. Select Sub OnAfterPrintJob(ByVal Doc) from the drop-down list.

6. Enter the VB script as shown, or reference the vbscript.txt file included in this article.

Note: You will need to change the label path to reflect where the labels are stored on your computer

7. Press OK to save the VB script. Now, after this label is printed, Next.lab will be printed to a different printer.

 

8. Once the call event is completed, make sure that the option "Load Printer saved in the document" is selected. 

Example Code:

dim nextLabel, nextlabel1, labelpath, labelpath2

labelpath="C:\label.lab"
labelpath1="C:\label2.lab"

set nextlabel = Application.Document.Open(labelpath,true)

nextlabel.PrintDocument(1)
nextlabel.FormFeed()
nextlabel.Close()

set nextlabel1 = Application.Document.Open(labelpath1,true)

nextlabel1.PrintDocument(1)
nextlabel1.FormFeed()
nextlabel1.Close()