View Documents |
Scroll |
Once an TheDocument is retrieved from the server it can be opened in the Thereforeâ„¢ Viewer.
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 |
Open the document in the Thereforeâ„¢ Viewer. |
Requirements and Assumptions: Document number 42 exists in your Thereforeâ„¢ system. If these assumptions do not apply to your system or configuration please replace them with appropriate values when copying the code samples below. Visual Basic Imports Therefore.API '...
' 1. Connect to the Thereforeâ„¢ server Dim server As New TheServer server.Connect(TheClientType.CustomApplication)
' 2. Declare and initialize a new Thereforeâ„¢ document Dim doc As New TheDocument
' 3. Retrieve the document from the server to the inbox Dim docNo As Integer = 42 Dim filename As String = doc.Retrieve(docNo, "", server)
' 4. Open the document in the Thereforeâ„¢ Viewer. doc.View() C# using Therefore.API; //...
// 1. Connect to the Thereforeâ„¢ server TheServer server = new TheServer(); server.Connect(TheClientType.CustomApplication);
// 2. Declare and initialize a new Thereforeâ„¢ document TheDocument doc = new TheDocument();
// 3. Retrieve the document from the server to the inbox int docNo = 42; string filename = doc.Retrieve(docNo, "", server);
// 4. Open the document in the Thereforeâ„¢ Viewer. doc.View(); |
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. |