docvar Parameter

Assigns a value to a variable that is global to all file views of the current document.

Scope: Document

Syntax

query docvar.Name 
set docvar.Name Value 

Options

Name 
User-defined name for the global variable
Value 
Value assigned to the global variable.

Description

The docvar parameter assigns a value to a variable global to all file views of the current document. Such global variables remain until all file views of the document are closed. They may be set or queried from any file view of the document in which they are defined.

Examples

  1. To display the value of a global variable called x, type:
    query docvar.x
  2. To assign the value company name to a global variable called x, type:
    set docvar.x company name 

API Return Code

-1 
The option specified with the parameter was not valid. Check the syntax requirements for the parameter and try the set or query command again.

docvarlist Parameter
global Parameter
globallist Parameter