Vb Script To Terminate A Batch Follow

0
Avatar
Legacy Poster

I have a batch file with a number of labels that reference an access database.

 

Is it possible for a VB script within one of the labels to terminate the batch at that point if a condition is met.

 

Some products do not require the final few labels in the batch, however, the user has to go through till the end cancelling each subsequent label.

 

Version: Bartender 9.4

 

Many thanks,

 

Andrew

2 comments

0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

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.

0
Avatar
Legacy Poster
Comment actions Permalink

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,

Andrew

Please sign in to leave a comment.