Skip to main content

Search

Search

VB script before printing

Comments

7 comments

  • Avatar
    Peter Thane

    I would suggest you make the fields VB Script > Event Controlled Scripts and add the VB to either the OnPostPrompt or OnIdenticalCopies area

    0
  • Avatar
    Pascal Lacasse

    Hello,

    I just try out both of them and nothing have change with UCase.

    Any idea ?

     

    0
  • Avatar
    Peter Thane

    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
  • Avatar
    Pascal Lacasse

    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").Value

    If Detection = "1 lots ON" then

       LowerCase = UCase(LowerCase)

    elseif Detection = "2 lots" then

       LowerCase = UCase(LowerCase)
       LowerCase2 = UCase(LowerCase2)

    else

    End If

    0
  • Avatar
    Peter Thane

    What are you actually trying to print in your string? 

     

    0
  • Avatar
    Pascal Lacasse

    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
  • Avatar
    Peter Thane

    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.