ByteScout Barcode Suite - VBScript - Search barcodes in documents and write results to file with barcode reader sdk - ByteScout

ByteScout Barcode Suite – VBScript – Search barcodes in documents and write results to file with barcode reader sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – VBScript – Search barcodes in documents and write results to file with barcode reader sdk

How to search barcodes in documents and write results to file with barcode reader sdk in VBScript using ByteScout Barcode Suite

Learn to search barcodes in documents and write results to file with barcode reader sdk in VBScript

The sample shows instructions and algorithm of how to search barcodes in documents and write results to file with barcode reader sdk and how to make it run in your VBScript application. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK) and you can use it to search barcodes in documents and write results to file with barcode reader sdk with VBScript.

These VBScript code samples for VBScript guide developers to speed up coding of the application when using ByteScout Barcode Suite. This VBScript sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Further improvement of the code will make it more robust.

ByteScout provides the free trial version of ByteScout Barcode 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)

TestBarcodeReadingFromPDF.vbs
      
' Create BarCodeReader object Set bc = CreateObject("Bytescout.BarCodeReader.Reader") ' Limit barcode search to PDF417 barcodes only bc.BarcodeTypesToFind.PDF417 = True ' Create File System object Set FSO = CreateObject("Scripting.FileSystemObject") ' Get folder object (current folder) Set objFolder = FSO.GetFolder(".") ' Get file list Set files = objFolder.Files ' Create output file Set TS = FSO.CreateTextFile("output.txt") ' Run barcode search for PDF and TIFF files For Each file in files ext = UCase(FSO.GetExtensionName(file)) If ext = "PDF" Or ext = "TIF" Then bc.ReadFromFile file.Name For i = 0 To bc.FoundCount - 1 ' Write found barcode information to output file TS.Write("File: """ & file.Name & """ Page " & CStr(bc.GetFoundBarcodePage(i)) & ": Barcode: " & bc.GetFoundBarcodeValue(i)) & vbCRLF Next End If Next TS.Close Set bc = Nothing Set TS = Nothing Set FSO = Nothing MsgBox "Done! See output.txt with found results"

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode Suite Home Page

Explore ByteScout Barcode Suite Documentation

Explore Samples

Sign Up for ByteScout Barcode Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next