Skip to main content



Vb Script To Terminate A Batch



  • Avatar
    Domingo Rodriguez

    There is a VBScript function which you could make use of which is called Format.CancelPrinting(). However, I'm not sure if this will just cancel the current label being printed, or if this will cancel the pending batch of BT documents to be printed. In the worst case scenario, you could use Format.CancelPrinting() conditionally on every BT document.


    You can find further help on this function in BarTender's Help (F1 key) under the "Visual Basic Scripting > Scripting Objects > Object Reference > Format Object > Format Functions" topic.

  • Avatar
    Legacy Poster

    Thanks for the reply.

    I use Format.CancelPrinting() already when the script identifies a product that doesn't require a particular label. This works fine but in this case I was trying to stop the batch executing any further label prints when a certain condition is true. Though I did read through the VB script help as suggested and didn't realise I could eliminate the Continue option Format.CancelPrinting() object - which is an improvement.  Nothing on terminating the batch though but I suspected this would be the case. I'll re-look at the job and see if there is another way to deal with it.


    Thanks again,



Please sign in to leave a comment.