Dynamic Label Width Follow

Legacy Poster

Being new, I think I originally posted this in the wrong forum. Reposting here...
I have 3 label designs to print to a continuous-feed label printer. They are all 1" tall, but can be either 1.5", 2.0" or 2.5" wide. I'd like to put 3 radio buttons on the data entry form, and let the user decide which size label size is needed. Then, I'd like to take the selected value, and tie it to the label width.
I'm trying to do all of this with one BTW file, so I don't need 3 separate ones, one for each size.



Legacy Poster
Comment actions Permalink

Here's a script that totally doesn't work, but shows what I'm trying to do. I want to put a radio button on the data entry form (rdoSize), and based on the width the user selects, adjust the width of the label. Once that's done, I'll want to make some of the text boxes wider, but I'll start with just the label width. Also, I can't figure out in which event to put the script. Here goes:


select case Format.Objects("rdoSize").Value
   ' Print a 1.0" X 1.5" label...  
   case 1.5 
      Format.PageSetup.LabelWidth(btUnitsInches) = 1.5
   ' Print a 1.0" X 2.0" label...
   case 2.0     
      Format.PageSetup.LabelWidth(btUnitsInches) = 2.0
   ' Print a 1.0" X 2.5" label...
   case 2.5     
      Format.PageSetup.LabelWidth(btUnitsInches) = 2.5
end select
Ian Cummings
Comment actions Permalink

VB scripting inside a BarTender document for page size is read only.  You can only modify the page size programmatically while controlling BarTender via the .NET SDK API.


Templates under a template selector connected to the radio button form control would allow different labels designs to be printed at print time based on data entry selection, but a crucial limitation at the moment is that the page size is the same for each template.


I suggest you control BarTender externally via automation, and then print one of three documents based on the user input.

Please sign in to leave a comment.