Batch Barcode Generation in Visual Basic with Bytescout Barcode Generator SDK - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

Batch Barcode Generation in Visual Basic with Bytescout Barcode Generator SDK

  • Home
  • /
  • Articles
  • /
  • Batch Barcode Generation in Visual Basic with Bytescout Barcode Generator SDK

If you need batch barcode generation functionality in your application – use Bytescout Barcode Generator SDK as a batch barcode maker. This script can batch generate a specified number of barcodes with a set of values ​​- it can be used in stores or anywhere you need it.

The sample below shows batch generating 100 QR barcodes with the values starting from 1 and incrementing with a step value = 2 (generating 1,3,5,7, etc.)

VBScript

' HOW TO USE: save this file as "GenerateMultipleBarcodes.vbs'
' change parameters below to your parameters required
' the script wlil generate barcodes into the same folder
' output images are named using encoded value, for example: 100.png represents barcode with encoded value "100"
' TO RUN: install BarCode SDK and in Windows Explorer double-click on "MultipleBarcodes.vbs"


' BEGIN OF BARCODE BATCH GENERATION PARAMETERS
BarCodeType = 16 ' 16 = qr code
StartValue = 1 ' starting value
StepValue = 2 ' incrementing step for each new barcode
NumberOfBarcodes = 100 ' number of barcodes to generate

BarCodeSDKLicenseName = "demo"
BarCodeSDKLicenseSerial = "demo"

' END OF BARCODE BATCH GENERATION PARAMETERS
' do not change below this line

' initialize barcode library
Set bc = CreateObject("Bytescout.BarCode.Barcode")
bc.RegistrationName = BarCodeSDKLicenseName
bc.RegistrationKey = BarCodeSDKLicenseSerial

' set barcode type to generate
bc.Symbology = BarCodeType

' now make list of barcodes 
For i = StartValue to (StartValue + NumberOfBarcodes)*StepValue Step StepValue 

bc.Value = CStr(i)
bc.SaveImage CStr(i) & ".png"

Next

j = (StartValue + NumberOfBarcodes)*StepValue

Msgbox "Done: saved " & NumberOfBarcodes & " barcodes in PNG format with values starting from " & CStr(StartValue) & " to " &  CStr(j) & " (including) with step by " & CStr(StepValue)

' deinitialize barcode sdk
Set bc = Nothing

For the full list of available barcode types (BarCodeType) see this link: http://s3.amazonaws.com/bytescout.com/files/help/BytescoutBarCodeSDK/…

Tutorials:

prev
next