On this Page

    Script Files

    Scripting for Merge is done via embedded script within the template (.xatw) files. For all other applications, the script is defined in separate script source files - typically with a .wjs or .wjsinc file extensions. These files may in nested by using the #include and ##include statements. The #include statement loads the contents of a specified file. The file must exist or an error is triggered. The ##include by contrast is a conditional include of the specified file. If the file does not exist the statement is ignored.

    The syntax for #include and ##include is:

    #include "filename"
    ##include "filename"

    Where filename is any valid filename on your computer. The filename can have any file extension, but in most DocOrigin examples and documentation we use .wjsinc. If filename is not a fully qualified name, DocOrigin will assume it's a name within the same file folder as the source file. The #include and ##include statement must start on the first character of the line.