How to conditionally print an object on the last label Follow

Avatar
Domingo Rodriguez

BarTender Content Team


Question

How to conditionally print an object on the last page, based on an 1 of X serial number.

Answer

Find below a really simple example which demonstrates how you can do this in BarTender.

BarTender document

Basically I've created a new Data Source called "PrintCondition" which uses the following VBScript code:

If CInt (Format.NamedSubStrings("myserialnumber").Value) = CInt (Format.NumberSerializedLabels) Then
  value = "Yes"
Else value = "No"
End If


With regards to the "Last Label Printed" Text object, it will conditionally print based on the named data source "PrintCondition", as you can see below:

Do you have feedback or questions on this article? We encourage you to post them on our Community Forums