Quickly learn how to generate barcodes from spreadsheet in VBScript with this sample source code. What is ByteScout PDF Suite? It is the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can help you to generate barcodes from spreadsheet in your VBScript application.
These VBScript code samples for VBScript guide developers to speed up coding of the application when using ByteScout PDF Suite. Follow the instructions from scratch to work and copy the VBScript code. Use of ByteScout PDF Suite in VBScript is also described in the documentation included along with the product.
ByteScout provides the free trial version of ByteScout PDF Suite along with the documentation and source code samples.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
'*** Prepare Spreadsheet object
Set spreadsheet = CreateObject("Bytescout.Spreadsheet.Spreadsheet")
spreadsheet.RegistrationName = "demo"
spreadsheet.RegistrationKey = "demo"
' Load Excel document
spreadsheet.LoadFromFile("test.xlsx")
' Take the first worksheet
Set worksheet = spreadsheet.Worksheet(0)
'*** Prepare Barcode object
Set barcode = CreateObject("Bytescout.BarCode.Barcode")
barcode.RegistrationName = "demo"
barcode.RegistrationKey = "demo"
' Set barcode type to PDF417
barcode.Symbology = 13 ' 13 means PDF417 barcode
' Set higher resoultion (300 is good for printing)
barcode.ResolutionX = 300
barcode.ResolutionY = 300
' Show barcode caption (remove these lines if you don't need it)
barcode.DrawCaption = True
barcode.DrawCaptionFor2DBarcodes = True
' Run through worksheet rows
For i = 0 To worksheet.NotEmptyRowMax - 1
' Get barcode value from first worksheet column
barcode.Value = worksheet.Item(i, 0).ValueAsString
' Fit barcode into 40x15 mm rectangle
barcode.FitInto_3 40, 15, 4 ' 4 means millimeter units
' Save barcode image to file
barcode.SaveImage("barcode" & i & ".png")
Next
' Release objects
Set spreadsheet = Nothing
Set barcode = Nothing
60 Day Free Trial or Visit ByteScout PDF Suite Home Page
Explore ByteScout PDF Suite Documentation
Explore Samples
Sign Up for ByteScout PDF Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF Suite Home Page
Explore ByteScout PDF Suite Documentation
Explore Samples
Sign Up for ByteScout PDF Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: