Every ByteScout tool contains example VBScript source codes that you can find here or in the folder with installed ByteScout product. Want to generate barcode in your VBScript app? ByteScout Barcode SDK is designed for it. ByteScout Barcode SDK is the fully featured library to generate barcodes. Supports QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix and many other barcode types. Includes various options for barcode generation to ensure output quality, add barcodes to new or existing pdf files and images.
This code snippet below for ByteScout Barcode SDK works best when you need to quickly generate barcode in your VBScript application. Follow the instructions from the scratch to work and copy the VBScript code. Test VBScript sample code examples whether they respond your needs and requirements for the project.
Free trial version of ByteScout Barcode SDK is available for download from our website. Get it to try other source code samples for VBScript.
Set bc = CreateObject("Bytescout.BarCode.Barcode") ' display information about Code39 symbology msgbox "Encoding '012345' using Code39 symbology" & vbCRLF & bc.GetValueRestrictions(0) ' 0 = Code39 symbology ' set symbology to Code39 bc.Symbology = 1 ' 1 = Code39 symbology type ' set barcode value to encode bc.Value = "012345" msgbox "Saving Code39 barcode to 'Code39.png'" bc.SaveImage "Code39.png" ' Open the output file in default app Set shell = CreateObject("WScript.Shell") shell.Run "code39.png", 1, false Set shell = Nothing msgbox "Encoding '012345' using Aztec symbology" ' set symbology to Aztec (2D) bc.Symbology = 17 ' 17 = Aztec ' set barcode value to encode bc.Value = "012345" ' display information about Aztec symbology msgbox "Encoding '012345' using Aztec symbology" & vbCRLF & bc.GetValueRestrictions(17) ' 17 = Code39 symbology bc.SaveImage "Aztec.png" ' Open the output file in default app Set shell = CreateObject("WScript.Shell") shell.Run "aztec.png", 1, false Set shell = Nothing Set bc = Nothing