Archive Documents |
Scroll |
Archiving is the process of adding new documents to the Thereforeā¢ system. The Step By Step guide below explains how to create a new document, add streams, edit index data values and store the document on the server.
1 |
Connect to the Thereforeā¢ server (see "Server - Connect and Disconnect" for Details) |
2 |
Declare and initialize a new TheDocument instance. |
3 |
Create a temporary file. |
4 |
Set the Thereforeā¢ category for the document's IndexData. 4A. Set the category by number or 4B. Set the category by name |
5 |
Add one or more file streams to the document. |
6 |
Set some values in the document's IndexData. |
7 |
Archive the document on the server. |
8 |
Close the TheDocument and delete the temporary file. |
9 |
Optional. Print a success message on the console. |
Requirements and Assumptions: Category number 5 named "Invoice - Supplier" with the string fields "Filename", "FileType" and "InvoiceNo" and the money (decimal) fields "AmountNet" and "AmountVAT". Files "D:\\TestAll\\TestDocs\\Scsi.doc" and "D:\\TestAll\\TestDocs\\TEST.xls" on your local hard drive. If these assumptions do not apply to your system or configuration please replace them with appropriate values when copying the code samples below. |