How to export Visionic macro to VBScript

It is often required to export recorded Visionic macros to the VBScript. This option can be useful in variety of situations. For example:


  • Allow your macros to be started from another process as command-line processes
  • Allows you to customize operations in the macros using VBScript language
  • Allows your macros to be started from a scheduled job (cron job) to periodically perform operations.


The export function is not a part of Visionic5, mostly because of the changing nature of the macro language as we know it. In the last days of Visionic4, the language has been rapidly expanded to include new instructions, such as looping through record set and similar. These new features blocked the existing “Export to VBScript” functionality.

In this blog, you can download The process is very simple and can be done in the following way:

Unzip all files into the single directory and then from the command prompt execute this command:

cscript.exe export_macro.vbs //nologo “<full path to compiled MDB file>” “<macro name>” >macro.vbs

In the command line above, replace the following:

Replace what

<full path to compiled MDB file> C:\Users\John\Documents\Visionic Projects\Demo1\ini_files\database\demo1.mdb
<macro name> Name of existing / already recorded macro. If macro name has space(s) in the name, surround it with quotes.


Once the script is exported, open the generated VBS file in a file editor. As you can see the macro is “embedded” in the sub called “RunMacro”. At the top of the code there is initialization routine for the parameters; you can change this instruction to provide macro parameters from command line or similar.

The macro can be run with the command:

cscript macro.vbs

The constants on the top of the resulting VBS file dictate the IP address of the server (whether the server is on local machine or not).

Once exported, the macro can be manually updated as necessary. Feel free to change macro’s code and experiment with the VisApp object (source of which is at the end of the file).


It is indeed a great pleasure to invite you for a friendly gathering and a launch of our new product, Visionic 5.

It is intended to introduce you to our new software solution, and to provide an opportunity to catch up with friends and colleagues from the industry.

The event is scheduled for 7:00 pm. September 11, 2011 at the meeting room of the Novotel Amsterdam City Hotel.

The hotel is situated in Amsterdam’s business district, right by the Amsterdam RAI Exhibition and Convention Center:


Novotel Amsterdam City Hotel
Europaboulevard 10



Tel (+31)20/7219179

Fax (+31)20/6462823


The welcome drink and appetizers are available from 7:00 pm. and the product presentation is scheduled from 8:00 pm. to 10:00 pm.


Please confirm your presence since the number of invitations is limited.

We are looking forward to see you there.


Visionic5 upgrade – Outstanding features, integrated wizards, increased functionality AND 50% off

Visionic5 upgrade is ready, the question is: are you?

 With its outstanding new features, intergraded wizards and a range of tools, Visionic5 will become your one and only partner in day-to-day business, sufficient to handle more than you can imagine.

 It is not only M&C solution anymore; it is a skillful guide for novices, playground for experienced operators and reliable associate for engineers.

 Intorel Visionic solutions have always been designed to support your business and allow you to get the most out of your investment. Keeping up the same tradition, Intorel has decided to reduce the price of Visionic 5 upgrade to only 50% of the original price you paid for your Visionic system. Regardless of the Visionic version installed in your organization (Visionic 1, 2, 3 or 4), you can now upgrade to the most recent edition available, Visionic5.

This one-of-a kind offer is available only until 15th of December 2011 and represents a unique opportunity to get up to date with your company’s software.

As always, Intorel is more than happy to address all your questions and concerns. For further information, please contact