Extract Files from Documents |
Scroll |
TheDocument represents a so-called compound file, a file that may contain one or more files (e.g. 2 word files, a PDF and 3 JPEG images), usually belonging to the same topic or task. These individual files in an TheDocument are often referred to as streams. The Step By Step guide illustrates how to extract one or all of these streams from a retrieved TheDocument.
1 |
Connect to the Thereforeā¢ server (see "Server - Connect and Disconnect" for Details) |
2 |
Declare and initialize a new TheDocument instance. |
3 |
Retrieve the document from the server. |
4 |
Extract all file streams to the specified directory using ExtractStream and the StreamCount property. |
Requirements and Assumptions: Document number 42 exists in your Thereforeā¢ system. Paths "C:\temp" and "C:\temp\extract" are valid on your system. If these assumptions do not apply to your system or configuration please replace them with appropriate values when copying the code samples below. |
Using the Default Thereforeā¢ Inbox If the empty string ("") is passed as the second (strInbox) parameter of the Retrieve method, the default Thereforeā¢ inbox will be used for retrieval. |