Special Control Names

VBVoice uses the control name to identify properties. Therefore, ensure that no control names are identical, even if on different forms. If you find two identical names, rename one.

Note that VBVoice does check for this condition during the system check. Visual Basic also enforces this rule except when multiple forms are in use.

In addition, VBVoice supports three special names:
  1. %#this%

  1. %#channel%.

  1. %#projectdir%

%#this%

Use this substitute control name to refer to the control owned by the greeting or property containing it.

The default EntryGreeting in the PlayMsgs control uses the %#this% control name to refer to one of its properties, so that the default greeting works regardless of the actual control name.

%#channel%

At runtime, this special field name is replaced with the channel number of the call. Use this field to create channel-specific names.

EXAMPLE

In a Record control, you may want to record into a temporary file, without having to create a unique filename every time.

The %#channel% name can be used to create a filename specific to each channel:

newfile%#channel%.wav

This value entered in the Filename property of a Record control creates a file, newfile1.wav, newfile2.wav, whose name is dependent on the channel for which it is created.

%#projectdir%

Use this name as a filename prefix in conjunction with the language control to ensure that:

  1. this file will be opened in the project directory only

  2. this file will not be opened in the directory specified by the current language

This may be useful in a multilingual system when playing back recorded files which are not language-dependent.