Moving Y Position On Barcode Follow

0
Avatar
Legacy Poster

I'm trying to move my Bar Code 1 on the Y axis when Bar Code 2 is empty. I tried it in all of the Label Format Options but it begins in the correct area but when it Prints or Print Previews it comes out where it is. The code is:

 

If Format.Objects("Bar Code 2").Value = "" then

       Format.Objects("Bar Code 1").Y = "1.625"

End If

 

I put it in OnPrintJobStart but it only came out in the correct spot before it printed. I then put it in all of the Label Format Options and it still didn't work. What an I doing wrong?

2 comments

0
Avatar
Shotaro Ito
Comment actions Permalink

Try In BarTender Document Options > VB Script,

 

OnNewRecord:

Format.MeasurementUnits = btUnitsInches 
If Format.Objects("Barcode 2").Value = "" then
  Format.Objects("Barcode 1").Y = 1.625
Else
  Format.Objects("Barcode 1").Y = 1
End If

 

OnPrintJobEnd:

Format.MeasurementUnits = btUnitsInches 
Format.Objects("Barcode 1").Y = 1

Make sure proper object name has been specified too.

0
Avatar
Legacy Poster
Comment actions Permalink

Thank you it worked.

Please sign in to leave a comment.