Dynamically Changing Objects at Print Time using VB Script



Similar documents
BarTender Software Activation

BarTender s.net SDKs

BarTender s ActiveX Automation Interface. The World's Leading Software for Label, Barcode, RFID & Card Printing

Licensing for BarTender s Automation Editions

W h i t e P a p e r. Using BarTender with Terminal Services and Citrix MetaFrame Printing and Licensing Issues

BarTender Web Print Server

What s New in BarTender 9.1

Commander. The World's Leading Software for Label, Barcode, RFID & Card Printing

What s New in BarTender v9.3

RFID Price Lowered RFID now Available at a new, lower Price...12

BarTender Software Activation. A Guide to Activating BarTender Software WHITE PAPER

What's New in BarTender 2016

Choosing the Right BarTender Edition

Integrating with BarTender Integration Builder

BarTender Integration Methods. Integrating BarTender s Printing and Design Functionality with Your Custom Application WHITE PAPER

Integration Overview. The World's Leading Software for Label, Barcode, RFID & Card Printing

BarTender Version Upgrades. Best practices for updating your BarTender installation WHITE PAPER

Getting Started with BarTender

Status Monitoring. Using Drivers by Seagull to Display Printer Status Information WHITE PAPER

What s New in BarTender 9.2 Revision Control, new Print Utilities, new Commander Features, and more!

Printer Maestro. True Enterprise Print Management for Windows WHITE PAPER

The World s Leading Software for Label, Barcode, RFID & Card Printing

Licensing for BarTender s Automation Editions. Understanding Printer-Based Licensing WHITE PAPER

32-bit and 64-bit BarTender. How to Select the Right Version for Your Needs WHITE PAPER

History Explorer. View and Export Logged Print Job Information WHITE PAPER

BarTender Print Portal. Web-based Software for Printing BarTender Documents WHITE PAPER

LSGMI REMOTE DESKTOP SERVICES.

User Management Resource Administrator. UMRA Example Projects. Service Management

Check current version of Remote Desktop Connection for Mac.. Page 2. Remove Old Version Remote Desktop Connection..Page 8

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

CODESOFT Installation Scenarios

Librarian. Integrating Secure Workflow and Revision Control into Your Production Environment WHITE PAPER

Quick Start to Evaluating. HP t5630w, HP t5730w, HP gt7720

Revision Control. Solutions to Protect Your Documents and Track Workflow WHITE PAPER

Setting Up a DYMO LabelWriter 400, 450, or 450 Turbo Printer with Terminal Services

FAQ CE 5.0 and WM 5.0 Application Development

Upgrading MM components to Release 5.1 using Modular Messaging 5.1 Upgrade application

Citrix XenApp-7.6 Administration Training. Course

Creating Serial Numbers using Design and Print Online. Creating a Barcode in Design and Print Online. Creating a QR Code in Design and Print Online

Version 5.0. SurfControl Web Filter for Citrix Installation Guide for Service Pack 2

my.airproducts.com Windows Vista Client Configuration

Sage MAS 90 and 200 ERP

Legal Notes. Regarding Trademarks KYOCERA Document Solutions Inc.

extranet.airproducts.com Windows XP Client Configuration

Copyright 2011 DataNet Quality Systems. All rights reserved. Printed in U.S.A. WinSPC is a registered trademarks of DataNet Quality Systems.

Unified Utility Manual Label Printer. Rev. 2.08

FX-BTCVT Bluetooth Commissioning Converter Commissioning Guide

NiceLabel Quick Start Guide

Data Warehouse Troubleshooting Tips

Printer Performance and Troubleshooting Printers

FileMaker Pro and Microsoft Office Integration

Software User's Guide

Course 6291A: Updating Your Technology Knowledge of Microsoft Windows XP to Windows 7 Beta

Strategic Asset Tracking System User Guide

Tutorial: Mobile Business Object Development. SAP Mobile Platform 2.3 SP02

How To Print On A Computer On A Macbook With A Powerpoint 3D (For Free) On A Pc Or Macbook 2 (For Cheap) On Pc Or Pc Or Ipad (Forfree) On An Ipad 3D Or

Crystal Print Control Installation Instructions for PCs running Microsoft Windows XP and using the Internet Explorer browser

for Sage 100 ERP Business Insights Overview Document

Managing Enterprise-wide Printing: The IT Challenge

Accessing Minitab from your own computer without buying it.

Legal Notes. Regarding Trademarks. Model supported by the KX printer driver KYOCERA MITA Corporation

Sage 100 ERP. Installation and System Administrator s Guide

INSTALL AND CONFIGURATION GUIDE. Atlas 5.1 for Microsoft Dynamics AX

Last modified on for application version 4.4.4

National Fire Incident Reporting System (NFIRS 5.0) NFIRS Data Entry/Validation Tool Users Guide

ACTIVE DIRECTORY DEPLOYMENT

Version /10. Xerox ColorQube 9301/9302/9303 Internet Services

Creating a Semantic Web Service in 5 Easy Steps. Using SPARQLMotion in TopBraid Composer Maestro Edition

Troubleshooting steps for Oracle Financials and Markview. Jan 2015

Table of Contents. Pocket Label Gallery White Paper

IBM FileNet eforms Designer

Introduction to TightVNC. Installation. TightVNC for Windows: Installation and Getting Started. TightVNC Version 2.6 Copyright 2012 GlavSoft LLC.

Océ Windows Printer Driver. Make the link. User guide Overview and usage

Technical Overview of Terminal Services

HP LaserJet MFP Analog Fax Accessory 300 Send Fax Driver Guide

AdminStudio Release Notes. 16 July Introduction New Features... 6

Brother Automatic Printing OPERATION MANUAL

Track Em Version 3.1

IBM Emptoris Contract Management. Release Notes. Version GI

Managing Documents in the Citrix XenApp Remote Desktop

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

NETWORK PRINT MONITOR User Guide

Creating Fill-able Forms using Acrobat 8.0: Part 1

Aspera Connect User Guide

How To Use Senior Systems Cloud Services

VERITAS Backup Exec TM 10.0 for Windows Servers

WinCC. Configuration Manual. Manual Volume 2

The World s Leading Label & RFID Software

Sage ERP MAS 90 Sage ERP MAS 200 Sage ERP MAS 200 SQL. Installation and System Administrator's Guide 4MASIN450-08

PTC Integrity Eclipse and IBM Rational Development Platform Guide

Label Gallery Software for Microsoft Windows Terminal Services and Citrix MetaFrame

IBM Sterling Control Center

Cisco Jabber for Windows

IBM Security Access Manager for Enterprise Single Sign-On Version User Guide IBM SC

User Manual. Call Center - Agent Assistant Application

Avery Dennison UK Consumer Helpline: Consumer

Setting up VPN and Remote Desktop for Home Use

Rational Rational ClearQuest

Transcription:

The World's Leading Software for Label, Barcode, RFID & Card Printing White Paper Dynamically Changing Objects at Print Time using VB Script Using BarTender s Document-Level Scripts to Change Text, Barcode, and other Objects at Print-Time

Contents Overview... 3 Object Automation... 3 Programmatically Modifying Label Object Properties... 3 Document-Level VB Script Support... 3 List of New Document-Level Events... 4 On-the-fly Modification of Object Properties... 4 Support for Data-Sourced VB Script... 5 Sample Document... 5 Page 2

White Paper: Dynamically Changing Objects at Print Time using VB Script Overview By combining two features, Object Automation and Document-Level VB Script Support (both introduced in version 9.3 and described below), you can create labels that dynamically change the appearance of objects during a print job depending on the data being printed. Object Automation When we talk about automating BarTender, we refer to the general process of controlling BarTender from within other software. When we talk about object automation, we are referring more specifically to the process of manipulating individual objects on the label, such as barcodes and text. This is in contrast to application automation functions, such as loading a label format or printing it. Programmatically Modifying Label Object Properties BarTender s automation commands to support changing an object s position, size, color, and visibility under programmatic control. These commands can be issued from inside BarTender using VB Script or issued from outside of BarTender using our ActiveX Automation interface. This interface lets you change properties like: Position Color Size Visibility Font For full documentation on all object properties, see the Automating BarTender section in the BarTender online help system. Document-Level VB Script Support BarTender supports the execution of VB Script in response to a variety of documentlevel events, including open, close, save and a variety of print-time events. You can call the Object Automation functions from within this VB Script to programmatically modify BarTender label objects before and even during print jobs. To access the document-level VB Script, select Label Format Options from the File menu, and view the VB Scripting tab. Page 3

White Paper: Dynamically Changing Objects at Print Time using VB Script List of New Document-Level Events The VB Scripting tab provides access to the VB Script assistant where you can define scripts for the following document-level events: OnOpen Executed when the document is opened. OnClose Executed when the document is closed. OnSave Executed when the document is saved. OnPrintJobStart Executed when the document is begins printing. OnNewRecord Executed during printing, each time a new record is read from the database. This is the event that will most often be used to change objects during the middle of a print job. OnSerialize Executed during printing, each time there is an opportunity for a serial number to change. OnIdenticalCopy Executed during printing, each before every label that is printed, even identical copies. OnPrintJobEnd Executed when the printing of the document ends normally. OnPrintJobCancel Executed when the printing of the document is canceled. On-the-fly Modification of Object Properties A common use case for this feature would be to change object s in response to the data coming from a database. In this case you would write a script for the OnNewRecord event. You could change the color of a text object, depending on whether or not a warning condition was indicated. For example, you could write the following script for the OnNewRecordEvent. Set Notice = Objects( Notice Text ) If (Field( Condition ) = Warning ) Then Notice.TextColor = btcolor.red Else Notice.TextColor = btcolor.green End If Page 4

White Paper: Dynamically Changing Objects at Print Time using VB Script If you wanted to have a field in your database contain the name of a color like red or yellow, you could use the code below to set the color of an object. Objects( Box 1 ).FillColor = BtColor.FromName(Field( Color )) You can hide or show objects based the data that is printed. You can either use an object s Visible property, or you can simply move it on or off of the design area, using its X and Y properties. For example: Set RedBar = Objects( Red Bar ) If (Field( Weight ) >= 50) Then RedBar.PrintVisibility = True Else RedBar.PrintVisibility = False End If Support for Data-Sourced VB Script You can even feed VB Script into BarTender from external sources, such as a database or a program that is controlling BarTender. For example, you could have a field in a database contain VB Script code. Then, when BarTender reads the data record that contains that field, VB Script code in BarTender can use the VB Execute statement or the Eval function to execute the imported VB Script code. This could be done to let a field in a database source the color for an object on the label. For example, if you had a field in your database that was supposed to contain the color for a line object, you could use the following code to treat that field as VB Script code. Objects( Condition Bar ).LineColor = Eval(Field( Condition Color )) Then the Condition Color field in your database could contain values like BtColor.FromRGB(255,0,0) or BtColor.Red. Sample Document The GHS_Demo.btw file that is installed with BarTender is a good example of a VB Script that changes object s size, color, and moves them on and off of the design area to control visibility. Page 5

Available Seagull White Papers General White Papers The Advantage of Drivers by Seagull Companion Applications Printer Maestro: True Enterprise Print Management for Windows Librarian BarTender Security Center BarTender Web Print Server Recent Upgrades What s New in the Latest BarTender Integration White Papers Integration Overview Commander Commander Examples BarTender's.NET SDKs BarTender's ActiveX Automation Interface Exporting Printer Code Templates Using BarTender with Remote Desktop Services and Citrix XenApp Integration with Oracle's WMS and MSCA Integration with IBM WebSphere Sensor Events Integration with SAP Miscellaneous White Papers Weighing Scales Dynamically Changing Objects at Print Time using VB Script GHS Compliance Labeling Licensing for BarTender's Automation Editions Printing International Characters Using BarTender BarTender Software Activation Using BarTender's Application Identifier Wizard Optimizing Output Performance Status Monitor Overview Silent Install For downloadable versions, visit: www.seagullscientific.com/aspx/white-papers.aspx Version: 2012-09-12 15:00 Copyright 2012 Seagull Scientific, Inc.