Using VBScript as a Data Source Type

Text, encoder, and barcode objects on a template can receive their data from a number of sources, including your keyboard, database or text files, and your computer's time and date functions. Sometimes, however, you may have special requirements, such as needing to read data from a file, process it, change it in some special way, and then perhaps combine it in an unusual manner with some other data. By offering the power of Microsoft's VBScript as a data source type, BarTender lets you process and combine the data for objects on a template in just about any way imaginable.

ClosedTo set a data source's type to VBScript

  1. Add a text, encoder, or barcode object to your template.

  2. Double-click the border of the object to open that object's Properties dialog. Alternatively, select Properties from the object's context menu.

  3. In the Navigation Pane, select the data source whose type you want to change.

  4. Click the Data Source tab.

  5. On the right of the Type field, click to open the Change Data Source Type Wizard.

  6. From the Type dropdown list, select Visual Basic Script.

  7. Click Finish to close the Change Data Source Type Wizard.

  8. Select the desired Script Type.

You can enter your script directly into the text field. To use the advanced scripting functions of the Script Editor, click the Edit with Script Editor button.

To make Visual Basic Scripting accessible to more than just programmers, BarTender provides three levels of complexity for Visual Basic Script users who want to use VBScript as a data source type.

BarTender does not support automation for data entry controls. If you attempt to use an Object property in a data entry script (such as the OnPrePrompt or OnPostPrompt events), BarTender will return an error and your script will fail to execute.

In This Section