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

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

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction 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 and ByteScout Data Extraction Suite

How to write a robust code in VBScript to search barcodes in documents and write results to file with barcode reader sdk with this step-by-step tutorial

Sample source code below will display you how to manage a complex task like search barcodes in documents and write results to file with barcode reader sdk in VBScript. ByteScout Data Extraction Suite can search barcodes in documents and write results to file with barcode reader sdk. It can be applied from VBScript. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.

This prolific sample source code in VBScript for ByteScout Data Extraction Suite contains various functions and other necessary options you should do calling the API to search barcodes in documents and write results to file with barcode reader sdk. 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! This basic programming language sample code for VBScript will do the whole work for you to search barcodes in documents and write results to file with barcode reader sdk.

You can download free trial version of ByteScout Data Extraction Suite from our website with this and other source code samples for VBScript.

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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction 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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next