VB script before printing
Hi,
in the form before printing user enter data in some input box
But before printing i want to turn on UCase on some input depend data
Where should i place my scripts ? Thanks for your help
Dim Detection, LowerCase, LowerCase2
Detection = Format.NamedSubStrings("Selection").Value
LowerCase = Format.NamedSubStrings("Lot#").Value
LowerCase2 = Format.NamedSubStrings("Lot#2").Value
If Detection = "1 lots ON" then
UCase(LowerCase)
elseif Detection = "2 lots" then
UCase(LowerCase)
UCase(LowerCase2)
else
End If
-
Peter Thane
★ BarTender Hero ★
I would suggest you make the fields VB Script > Event Controlled Scripts and add the VB to either the OnPostPrompt or OnIdenticalCopies area
0 -
Pascal Lacasse
★ BarTender Hero ★
Hello,
I just try out both of them and nothing have change with UCase.
Any idea ?
0 -
Peter Thane
★ BarTender Hero ★
I believe you need to amend the VB if and elseif lines to something like
LowerCase = UCase(LowerCase)
etc. to make it apply the formatting
0 -
Pascal Lacasse
★ BarTender Hero ★
just try out on both onpostprompt or onidenticalcopies and script still not working
Have another idea ? Thank you
Dim Detection, LowerCase, LowerCase2
Detection = Format.NamedSubStrings("Selection").Value
LowerCase = Format.NamedSubStrings("Lot#").Value
LowerCase2 = Format.NamedSubStrings("Lot#2").ValueIf Detection = "1 lots ON" then
LowerCase = UCase(LowerCase)
elseif Detection = "2 lots" then
LowerCase = UCase(LowerCase)
LowerCase2 = UCase(LowerCase2)else
End If
0 -
Peter Thane
★ BarTender Hero ★
What are you actually trying to print in your string?
0 -
Pascal Lacasse
★ BarTender Hero ★
They are choosing a lot # (10) from a dropdown lit stocked in an excel document.
But we ship to some client who want all our lot # (10) in UCase format.
0 -
Peter Thane
★ BarTender Hero ★
You could just ignore the VB route and add a extra field/substring to the barcode after the existing lot number that links to the lot number as before. Then for one of these adjust the Transforms > Character Filter and tick the Upper case option whilst leaving the other string the same. However you would also need to set a Transforms> Suppression routine for each, one that prints only when the upper case is required (Selection equals "2 lots") and the other when it is Selection does not equal "2 lots" or something like that
0
Please sign in to leave a comment.
Comments
7 comments