The vba studio – Kofax DOKuStar Validation User Manual

Page 38

Advertising
background image

DOKuStar Validation Programming Manual

Page

34

The VBA Studio

Yet, I didn’t mention one important thing: Where does all the code go?

In most development environments, you have some file handling functionality, like File...Open/Close menus or
something similar to that. The VBA studio is different here: When you look around in the studio, you will not find
anything like it. So: Where is the code stored?

The answer is simple: It all goes into a file with the same name as the DOKuStar Validation project but an extension

.vps

. So when you open a project

MyProject.vpj

in DOKuStar Validation, switch to the VBA studio, write

some code, and use the

Save

command of the

File

menu, you will then find a file

MyProject.vps

in the same

path as the project file.

All code always goes to this single file, no matter how many Modules, Class Modules or User Forms you added.

As a consequence, you always need to open a DOKuStar Validation project before you are able to write some code.

This leads to the next question: Where can I write the code that creates a project file? In the Schema chapter it was
stated that I could write the integration code (that may lead to a project file) also in the VBA studio, but if I need a
project file beforehand, how is this done?

The solution lies in two more DOKuStar Validation command line parameters:

dsval --create-vba=<filename>

creates a new scripting file, and

dsval --vba=<filename>

opens an existing scripting file

Open a DOS box, go to the

bin

directory of the DOKuStar Validation installation and try the following:

The first statement creates a new scripting file. The second statement starts DOKuStar Validation in administrator
mode and loads the new scripting file. Change to the VBA studio, and you now have the possibility to enter code that
is independent from existing DOKuStar Validation projects.

Advertising