

Then on the Transforms tab, select the icon next to VB Scripting. When this is your purpose, you need to set the data source type of the object to embedded data, database field, time, or date. For example, you may want BarTender to cancel print jobs that would produce more than a specified number of copies. At other times, you may want another ActiveX-aware application on your system to react in some controlled way to an event in BarTender.

Sometimes your data needs to be validated or processed in an unusual way before printing. The Edit button on that tab opens the Script Assistant, where you can create the script.Ī script can be used to perform special validation or other processing on data from some other source, such as a database or the keyboard. To use this feature, you need to set the data source of the object to Visual Basic Script on the Data Source property page. By offering the power of Microsoft's Visual Basic Script as a data source type, BarTender lets you process and combine the data for objects on a template in just about any way imaginable. For example, you may need to read data from a file, change it in some special way, and then perhaps combine it in an unusual manner with some other data. Sometimes, however, you may have special requirements. Text, encoder, and barcode objects on a template can receive their data from a number of sources, including your keyboard, data source files, and your computer's time and date functions. The script output can be used as the data source type for a text, encoder, or barcode object. There are basically two types of purposes for which you can use BarTender's internal scripting feature:

For more information, see Automating BarTender. To automate BarTender from an external application, you will need to use BarTender's ActiveX Automation interface, or install the BarTender.

The topics contained within this section refer to using Visual Basic scripts within BarTender's user interface. Understanding Visual Basic Scripting Visual Basic Scripting in BarTender
