Free 14-Day Evaluations    
Product Downloads    

Sign in     

 Home  >>  Documentation  >>  TinyTERM Plus for Windows  >>  VBA Automation

“I chose TERM because it offers a better communications package in terms of dialogue and protocol flexibility. I also found the price within a reasonable range to make it cost effective in the long run.”
— Mark Hershberger

VBA Automation

As of version 4.8.2, TinyTERM Plus provides VBA automation capabilities for TN3270 and TN5250 emulation. The basic com interface for TinyTERM currently supports a single session.


To use VBScript or VBA, you will need TinyTERM Plus version 4.8.2 (November 2013) or higher, installed on Windows XP or newer. VBScript must be enabled.

Alternatively, you can use a copy of Microsoft Office that supports VBA script creation. Not all Office editions do, so verify this in your documentation.

Testing the Environment

To test your environment, open a text editor and enter the following:

Set objIE = CreateObject("InternetExplorer.Application")
  objIE.Visible = 1
  objIE.Navigate ""

Save the file as LaunchIE.vbs. Double-click the file after saving. It should open Internet Explorer and go to the Century Software, Inc., home page.

A similar script can be used in any application that supports VBA.

Starting TinyTERM

Starting TinyTERM works in similar fashion, but uses a slightly different set of commands from Internet Explorer. The following instructions will demonstrate a TN3270 connection.

First, configure TinyTERM for TN3270 emulation. Save this as the default configuration in default.tpx.

Next, enter the following lines into a text file:

Set objTT = WScript.CreateObject("Century.TinyTERM")

Save this file as LaunchTT.vbs and run it. This should load TinyTERM and show it on screen.

Next, you can create a session object, which loads the appropriate ActiveX control. To do this add the following lines to the LaunchTT.vbs file:

Set objte = objTT.Control
  objte.ConnectionType = 0
  objte.node = ""
  objte.netport = 23

Save the file, then double-click it again. As you can see, this should connect you to the system. The only supported command on that particular system is LOGOFF.

Supported Commands

The full set of TinyTERM properties and methods is supported via VBA and VBS. For example, loading a new session uses the OpenSession property:


Documentation for the properties and methods is in the Programmers Reference Manual PDF. Note that all examples in that manual use "te" as the object name. Replace that with the object name you've chosen with the Set command, as with "objte" in the examples above.

Sample Scripts

The following scripts demonstrate some of the capabilities of TinyTERM Plus when used with automation. Each is documented line-by-line, explaining what each command is intended to do:

  Copyright © 2017 Century Software, Inc. All Rights Reserved (1.0.1)499 TERMS OF USE PRIVACY POLICY EULA