Write method
The Write method saves the runtime batch object to a batch file, or a page object to a page file. When it writes a batch object, this method also writes all of the child objects, including documents, pages, and fields.
When you create a batch with an application that you developed
in Datacap Studio, Datacap saves the batch as
an XML file. The file is named after the last completed task in the
workflow of the application. When you create a batch with an application
that you developed outside of Datacap Studio, you can use the Write method
to save the batch object to a file.
Syntax
- VBScript
oDCO.Write(lpszFileName as String) as Boolean- C#
bool Write(string lpszFileName)
Applies to
Batch or page objects.Arguments
- lpszFileName
- The full path and name of the output file.
Returns
Returns true if successful; returns false if unsuccessful.C# example
This example writes the 20030086.003 batch object and the page objects of the batch to Verify.xml file.bStatus = objBatch.Write ("c:\Datacap\MQSW\Batches\20030085.003\Verify.xml")
objPage.CreateFields
bStatus = objPage.Write ("c:\Datacap\BDOcs\Batches\20030085.003" & objPage.ID)