Close Label File after print Follow

Bartender User

My goal is to close my label file after the print ends.

Initial thought is to VB Scripting in the ObPrintJobEnd event (File -> BarTender Document Options -> Check VB Scripting option -> Select OnPrintJobEnd event -> Edit... button).

I'm new to VB scripting, but my thought is that i need to establish a handle to the BarTender application, then establish a handle to my label file and then execute a ".Close" command.

I've toyed around with various formats of the syntax but can't seem to get anything working:


Dim objBTApp, objBTLabelFile
Set objBTApp = GetObject(,"Application.Bartender")

after this point I've tried many iterations of syntax combinations. I could list a few but i'm sure they'd provide no benefit or further exemplify my 3rd sentence in this post;  "I'm new to VB scripting".


Any help is appreciated!


Pete Thane
Comment actions Permalink

If you are using Automation or Enterprise editions you could run BarTender via a Command Line that includes /Close to close the application when you have finished printing (search for Command Line Parameter Reference in the Help menu to find a list of the commands).

Alternatively if you juts want the label format to close once the print job has been run, print via Print Station as unless Repeat Data Entry Until Cancelled has been enable on the File>Print>Options tab then the label will close after you have printed although Print Station itself will remain open.

Please sign in to leave a comment.