Arbortext Command Language > Functions by Alphabetical Listing > document_export
  
document_export
document_export ([inFile[, outFile[, styleFile[, logFile[, nFlags]]]]])
This function starts an export process with the specified parameters. This function returns a one (1) if the export was successful. document_export returns zero (0) if unsuccessful.
document_export has the following parameters:
inFile is the path name of the document to export. If null, the current document is used.
outFile is the path name of the converted document.
styleFile is the Arbortext Styler-created style sheet to use during the export.
logFile is the path name of a log file used to record information about the export process.
nFlags is a set of bit flags (that is, an integer argument, not a string argument), defined as follows:
If bit 0,flagLightsOut is 1 (decimal value of 1), the export process is run “lights-out” or batch mode. In this mode, the export process will not prompt the user for anything on screen. The default value for this option is dependent on how Arbortext Editor is being run. The default is 0.
If bit 4, flagViewRTFResult, is 1 (decimal value of 8), the system-defined RTF application (typically Microsoft Word) will display the exported RTF file automatically when the process is complete.
* 
The Arbortext Import/Export bit flags are defined as the following ACL constants:
#################################
# Import/Export bit flags
#################################
global flagLightsOut = 0x0001
global flagViewRTFResult = 0x0010
The first three parameters (inFile, outFile, and styleFile) are optional in that they need not be specified in the function call. However, if any one of them is not specified, a dialog box will be displayed to allow the user to specify valid values for them. The final two parameters (logFile, nFlags) are optional. If they are not specified, default values will be used. If the last parameter, nFlags, is set to 1, the first three parameters must be specified because no dialog box will be displayed to allow the user to specify valid values for them. If nFlags is set to 1 and one of the first three parameters is not specified, the function will return 0 stating failure of the export process.