BOSS 7 f'5-' O<' L '1 $(#((-8(+(I>i {(($(S ( 3(m( ) I(* :)D ) ,<) -< 3n)"x>)+) $) : & ()  9 C c") + *:*_3**ym" * S1 }1+ +.(+2+b+-+|H7 +$ $(+# +=3 +W* >7+q9 + X++22?+5&0 -+L r+5+2,+ +2;f <+ '# $+ +2[+5(A2  +u 3+8+26+=+P%. 3+ +j4+2++5 M*++: +!+2_0E g9+? +y'+2+:-+2 6 +T< 0+n #+2)+5/ +8 (?+I +2+5}>c/ &+ & B+ +2>+5+$5 5+X \+r":+2+5+3(1 + v,+M7+2-+5+=g + $ ;+( +2+\*B3 #+  +!v9+2+57?+&0 72+Q +5k Q+ (+, k+; 7+,# +F2 +` .+( ,+z+!+.8 =+ ; F%+=+o4 U%08Joops.OfficeTalk.ScriptExportCore.Array@replaceOptionobjects  Joops.Scripting.ScriptpersistentObjectdirtynamemethods"&*.2Joops.Scripting.ScriptNameparentglobalCategoryglobalNamecategoryname>BFJN:R6bDocuWareVZ^Core.OrderedCollectionfirstIndexlastIndexjnf @rwithAll:Joops.Scripting.ScriptMethodSourcesourcestartMethodarguments"&*~Joops.Scripting.ScriptMethodName>BFJNTestLibraryCore.GapStringstringgapStartgapSizemTestLibrary 'This macro tests the basic functionality of the docuware library 'Login "admin" / "admin" is used to start the session 'The archive location is fetched with macro DocuWare.DefaultArchive 'Documents with index data "35,GESCANNT" are queried Library "..\library\docuware5pcl" Dim dialog As ScriptDialog Dim session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession session = Call DocuWare.Start ( Call DocuWare.pcl" Dim dialog As ScriptDialog Dim session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession session = Call DocuWare.Start ( Call DocuWare.DefaultUsername, Call DocuWare.DefaultPassword ) If session = Null Then Return Null Else dialog = New Joops.Scripting.ScriptDialog dialog.title( "Testing Docuware library" ) dialog.addInput( "35,GESCANNT", named: "query", width: 300, label: "Query for:" ) dialog.addRadioButton( "Results", named: "result", group: "options" ) dialog.addInput( Null, named: "key", width: 300, label: "Fieldname:" ) dialog.addRadioButton( "View", named: "view", group: "options" ) dialog.addRadioButton( "Read", named: "read", group: "options" ) dialog.addRadioButton( "Print", named: "print", group: "options" ) dialog.addRadioButton( "Send", named: "send", group: "options" ) dialog.addRadioButton( "Delete", named: "delete", group: "options" ) dialog.addActionButton( "Call DocuWare.TestLibraryAction ( session, dialog.value( ""query"" ), dialog.value( ""options"" ), dialog.value( ""key"" ) )", named: "Do It", width: 100, default: True ) dialog.addAcceptButton dialog.build dialog.open Call DocuWare.End ( session ) End IfSvzTestLibraryAction TestLibraryAction ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, queryString As String, selected As String, key As String ) 'Perform the selected action with the documents queried by queryString ' 'Return: Boolean True: action executed ' False: internal error Dim resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList Dim TKArchive As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKArchive Dim count As Integer Dim id As Long Dim keys As Array Dim ch As Character Dim iTKError As Integer TKArchive = Call DocuWare.GetArchive ( session, Call DocuWare.DefaultArchive ) If TKArchive = Null Then MsgBox( "Could not get archive: " & Call DocuWare.DefaultArchive ) Return False Dim ch As Character Dim iTKError As Integer TKArchive = Call DocuWare.GetArchive ( session, Call DocuWare.DefaultArchive ) If TKArchive = Null Then MsgBox( "Could not get archive: " & Call DocuWare.DefaultArchive ) Return False End If If selected = "read" Then id = queryString resultList = Call DocuWare.Read ( session, id, TKArchive ) Else resultList = Call DocuWare.Query ( session, queryString, TKArchive ) End If If IsNull( resultList ) = True Then MsgBox( "Internal error while querying" ) Return False End If iTKError = resultList.getResultCount( count ) If iTKError <> 0 Then MsgBox( "Could not retrive the results: " & iTKError ) Return False End If If count > 0 Then MsgBox( count & " documents found" ) If selected = "result" Then ch = ChrB( 44 ) Call DocuWare.ShowResults ( session, resultList, key.asArrayOfSubstringsSeparatedBy( ch ) ) End If If selected = "view" Then Call DocuWare.Open ( session, resultList ) MsgBox( "Click OK to close the viewer" ) Call DocuWare.Close ( session, resultList ) End If If selected = "read" Then Call DocuWare.Open ( session, resultList ) MsgBox( "Click OK to close the viewer" ) Call DocuWare.Close ( session, resultList ) End If If selected = "print" Then Call DocuWare.Print ( session, resultList ) End If If selected = "send" Then Call DocuWare.Send ( session, resultList ) End If If selected = "delete" Then If MsgBox( "Do you really want to delete the document", vbYesNo ) = 1 Then Call DocuWare.Delete ( session, resultList ) End If End If Else MsgBox( "No documents found " & Call DocuWare.DefaultArchive ) Return False End If Call DocuWare.CloseQuery ( session, resultList ) Return TrueOSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionStringStringStringvz MailnMail ( aDocument As String ) 'Mail the document aDocument 'Arguments: aDocument: The document to be send 'Return: Boolean: True (sended) ' False (no sended) Dim dialog As ScriptDialog Dim mail As Mail Dim sender As String Dim receiver As String Dim subject As String Dim text As String Dim accepted As Boolean Dim sent As Boolean sender = worker.adress.eMail mail = New Joops.Scripting.Mail dialog = New Joops.Scripting.ScriptDialog dialog.title( ("Send mail with attached " & aDocument) ) dialog.addInput( worker.adress.eMail, named: "sender", width: 200, label: "Sender:" ) dialog.addInput( "", named: "receiver", width: 200, label: "Receiver:" ) dialog.addInput( "", named: "subject", width: 350, label: "Subject:" ) dialog.addText( "", named: "text", width: 350, height: 200, label: "Text:" ) dialog.addCancelButton dialog.addAcceptButton dialog.build accepted = dialog.open sender = dialog.valueNamed( "sender" ) receiver = dialog.valueNamed( "receiver" ) If accepted = False Then Return False End If subject = dialog.valueNamed( "subject" ) text = dialog.valueNamed( "text" ) mail.addAttachment( aDocument ) mail.sender( sender ) mail.receiver( receiver ) mail.subject( subject ) mail.text( text ) sent = mail.send If sent = True Then MsgBox( "Document is sent" ) Else MsgBox( "Could not send the document" ) End If Return sentStringvz&*.Fields" Fields Library "..\library\docuware.pcl" Dim TKSession As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession Dim TKArchive As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKArchive Dim dwfieldindex As Long Dim dwfieldtype As Long Dim dwfieldname As String Dim dwfieldoption As Long Dim dwrank As Long Dim dwdezimal As Long Dim dwalias As String Dim i As Integer TKSession = Call DocuWare.Start ( "admin", "admin" ) If TKSession = Null Then Return "Fehler" End If TKArchive = Call DocuWare.GetArchive ( TKSession, Call DocuWare.DefaultArchive ) If TKArchive = Null Then MsgBox( "Unbekanntes Archiv: " & Call DocuWare.DefaultArchive ) Return "Fehler" End If For i = 0 To 10 Step 1 TKArchive.getDBFieldInfo( i, refDWFieldIndex: dwfieldindex, refDWFieldType: dwfieldtype, refStrFieldName: dwfieldname, reflFieldOptions: dwfieldoption, reflRankInResultList: dwrank, reflDecimals: dwdezimal, refStrAliasName: dwalias ) MsgBox( dwfieldtype & ": " & dwfieldname & " (" & dwfieldindex & ")" ) Next Return "OK"vz:>NPrint26Print ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList ) 'Print the first document in resultList with the Docuware printer 'Arguments: session: The Docuware session ' resultList: The result list ' archive: The archives full filename 'Return: Boolean: True (printed) ' False (not printed) Dim iTKError As Integer Dim iAnzTreffer As Integer Dim done As Boolean Try iTKError = resultList.getResultCount( iAnzTreffer ) If iAnzTreffer = 0 Then MsgBox( "No document to print" ) done = False Else resultList.printResult( 0 ) done = True End If End Try Catch done = False End Catch Return doneSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultListBFvzJZ^rReadRVRead ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, id As Long, TKArchive As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKArchive ) 'Read the document by id 'Arguments: session: The Docuware session ' id: The Docuware-ID ' TKArchive: The archive 'Return: DWTKResultList The resutlist or NULL if not found Dim sIndexData As String Dim sDOC_ID As String sDOC_ID = id sIndexData = "248," & sDOC_ID Return Call DocuWare.Query ( session, sIndexData, TKArchive )SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionLongSmallCOM.DocuWare_ToolKit_Type_Library.DWTKArchivebfjvzn~CloseQueryvzCloseQuery ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList ) 'Release the result lists resources 'Arguments: session: The Docuware session ' resultList: The result list 'Return: Boolean: True (resultlist released) ' False (no result list) Dim done As Boolean Try If resultList <> Null Then resultList.releaseResultList done = True Else done = False End If End Try Catch done = False End Catch Return doneSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultListvzArchiveArchive ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, archive As String, indexData As String ) 'Archives the document selected in the active basket 'If indexData is not given, open the archiving with the keyword dialog elsewhere 'take the given keywords 'Arguments: session: The Docuware session ' archive: The archives full filename the document is stored in ' indexData:The indexdata for the document (e.g. "35,GESCANNT") 'Return: String: The Docuware-ID ' NULL (not stored) Dim TKArchive As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKArchive Dim TKBasket As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKBasket Dim sDWBriefkorb As String Dim sDWDokFileName As String Dim iTKError As Integer Dim lDOC_ID As Double Dim more As Boolean Dim doDialog As Boolean MsgBox( "Mark now the document to archive" ) iTKError = session.getActiveBasket( sDWBriefkorb ) If iTKError <> 0 Then MsgBox( "No active basket, archiving is cancelled" ) Return Null End If iTKError = session.getBasket( sDWBriefkorb, refDWTKBasket: TKBasket ) iTKError = TKBasket.activate iTKError = session.getAllCheckedFileNamesInAB( sDWDokFileName ) If True = IsEmpty( sDWDokFileName ) Then MsgBox( "No document is marked in basket" ) Return Null End If more = sDWDokFileName.match( "*,*" ) If more = True Then MsgBox( "Mark only one document in basket, archiving is cancelled" ) Return Null End If TKArchive = Call DocuWare.GetArchive ( session, archive ) If TKArchive = Null Then MsgBox( "The archive " & archive & " could not be opened, archiving is cancelled" ) Return Null End If doDialog = IsEmpty( indexData ) TKArchive.storeDocumentDocID( ,numberOfPages: ,dialog: ,deleteFile: ,strIndexData: ,reflDocID: ) TKArchive.storeDocumentDocID( sDWBriefkorb & sDW TKArchive.storeDocumentDocID( sDWBriefkorb & sDWDokFileName, numberOfPages: 0, dialog: doDialog, deleteFile: True, strIndexData: indexData, reflDocID: lDOC_ID ) Return lDOC_ID/SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionStringStringvzOpen>Open ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList ) 'Show the first document in resultList with the Docuware viewer 'Arguments: session: The Docuware session ' resultList: The result list ' archive: The archives full filename 'Return: Boolean: True (viewer opened) ' False (viewer not opened) Dim iTKError As Integer Dim iAnzTreffer As Integer If IsNull( session ) Or IsNull( resultList ) Then Return False End If Try iTKError = resultList.getResultCount( iAnzTreffer ) If iAnzTreffer = 0 Then MsgBox( "No document to open" ) Return False End If resultList.showResult( 0 ) Return True End Try Catch MsgBox( "Could not open the viewer. DocuWare may not be started" ) Return False End CatchSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultListvzEndFEnd ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession ) 'End the Docuware session 'Arguments: session: The Docuware session 'Return: Boolean: True (session ended) ' False (no session) Try If session <> Null Then session.endDocuWare End If End Try Catch Return False End Catch Return TrueSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionvz Query@Query ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, indexData As String, TKArchive As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKArchive ) 'Query a document by index data 'Arguments: session: The Docuware session ' indexData: The seach values (e.g. "248, 000111") ' TKArchive The archive 'Return: DWTKResultList The resutlist or NULL if nothing found Dim TKResultlist As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList Dim iTKError As Integer Dim iAnzTreffer As Integer If ( session = Null ) Or ( TKArchive = Null ) Then Return Null End If iTKError = iTKError + TKArchive.open If iTKError <> 0 Then MsgBox( "Counld not open the archive " & archive<- Deklaration fehltnd If iTKError = TK TKArchive.open If iTKError <> 0 Then MsgBox( "Counld not open the archive " ) Return Null End If iTKError = TKArchive.searchDocumentEx( False, strIndexData: indexData, refDWTKResultList: TKResultlist ) If iTKError <> 0 Then MsgBox( "Error searching documents: " & iTKError ) Return Null End If iTKError = TKResultlist.getResultCount( iAnzTreffer ) If ( iAnzTreffer = 0 ) Or ( iTKError <> 0 ) Then If iTKError <> 0 Then MsgBox( "Error retreiving result count: " & iTKError ) End If TKResultlist.releaseResultList Return Null Else Return TKResultlist End Ifo ?SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionStringSmallCOM.DocuWare_ToolKit_Type_Library.DWTKArchivevz*2BSend"&Send ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList ) 'Send the first document in resultList 'Arguments: session: The Docuware session ' resultList: The result list 'Return: Boolean: True (document sent) ' False (document not sent) Library "..\library\docuware.pcl" Dim iTKError As Integer Dim iAnzTreffer As Integer Dim filename As String Dim done As Boolean Try i Dim iTKError As Integer Dim iAnzTreffer As Integer Dim filename As String Dim done As Boolean Try iTKError = resultList.getResultCount( iAnzTreffer ) If iAnzTreffer = 0 Then MsgBox( "No document to send" ) done = False Else iTKError = resultList.exportResult( 0, strDestFolder: Call DocuWare.DefaultExportDirectory, refBStrDocument: filename, options: 4 ) If iTKError <> 0 Then MsgBox( "Could not export document as file" ) done = False Else Call DocuWare.Mail ( filename ) Shell "" "del " & filename 'and delete the exported document file again done = True End If End If End Try Catch done = False End Catch Return done.7?SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList6:vz>NRbCloseFJClose ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList ) 'Closes an opened document viewer of resultlist 'Arguments: session: The Docuware session ' resultList: The resutlist 'Return: Boolean: True (Viewer is closed) ' False (no resultlist) Dim done As Boolean Try If resultList <> Null Then resultList.closeViewerResult done = True Else done = False End If End Try Catch done = False End Catch Return doneSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultListVZvz^nrDeletefjbDelete ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList ) 'Delete the first document in resultList 'Arguments: session: The Docuware session ' resultList: The result list 'Return: Boolean: True (document deleted) ' False (document not deleted, resultList contains nothing) Dim iTKError As Integer Dim iAnzTreffer As Integer iTKError = resultList.getResultCount( iAnzTreffer ) If iAnzTreffer = 0 Then MsgBox( "No document to delete" ) Return False End If resultList.deleteResult( 0 ) Return TrueSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultListvzvz~Results7Results ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList, keys As Array ) 'Answer the data value of all keynumbers in keys of all items in the result list resultList ' '5.2.2007; JOOPS Josef Springer 'Return was a big array with all fields instead of an array with arrays of results ' '16.2.2007 JOOPS, Josef Springer 'Use "(unknown field )" for unkown field numbers ' '26.2.2007 JOOPS, Josef Springer 'Fill an unknown column with an empty string instead of "Unknown column " ' 'Return: Array(Array) The key values of all documents found Dim iTKError As Integer Dim iAnzTreffer As Integer Dim index As String Dim result As Array Dim results As Array Dim fields As Array Dim i As Integer Dim ii As Integer Dim fieldNumbers As Integer Dim ch As Character Dim ki As Integer Dim columnFound As Boolean results = Array() If resultList <> Null Then Try iTKError = resultList.getResultCount( iAnzTreffer ) If iTKError <> 0 Then MsgBox( "Error retreiving result count: " & iTKError ) Return Null End If If iAnzTreffer > 0 Then ch = ChrB( 44 ) For i = 0 To iAnzTreffer - 1 Step 1 result = Array() resultList.getIndexData( i, refStrIndexData: index ) fields = index.asArrayOfSubstringsSeparatedBy( ch ) fieldNumbers = fields.size - 2 For ki = 0 To keys.size - 1 Step 1 columnFound = False For ii = 0 To fieldNumbers Step 2 If fields( ii ) = keys( ki ) Then result( result.size ) = fields( ii + 1 ) columnFound = True End If Next If columnFound = False Then result( result.size ) = " If columnFound = False Then result( result.size ) = "(unknown field " & keys( ki ) & ")" End If Next results( results.size ) = result Next End If End Try Catch MsgBox( "Could not build the results: " & Join( keys, ";" ) ) End Catch End If Return resultsSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultListArrayvzOpenOpen ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList, index As Integer ) 'Show document with number index (base 0) in resultList with the Docuware viewer 'Arguments: session: The Docuware session ' resultList: The result list ' index: The index of the entry within resultList 'Return: Boolean: True (viewer opened) ' False (viewer not opened) Dim iTKError As Integer Dim iAnzTreffer As Integer If IsNull( session ) Or IsNull( resultList ) Then Return False End If Try iTKError = resultList.getResultCount( iAnzTreffer ) If index >= iAnzTreffer Then MsgBox( "Invalid result number to open the document" ) Return False End If resultList.showResult( index ) Return True End Try Catch MsgBox( "Could not open the viewer. DocuWare may not be started" ) Return False End CatchSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultListIntegervzGetArchiveGetArchive ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, archive As String ) 'Get the archive named archive 'Arguments: session: The Docuware session ' archive: The archives full filename 'Return: TKArchive The opened archive Dim TKArchive As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKArchive Dim iTKError As Integer If session = Null Then Return Null End If iTKError = session.getArchive( archive, refDWTKArchive: TKArchive ) If iTKError <> 0 Then Return Null Else Return TKArchive End IfSmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionStringvzShowResultsShowResults ( session As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession, resultList As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultList, columns As Array ) 'Show the results of a query in a table. Each found document is displayed in a single line 'columns defines the document fields interested in and is used 'as the header for the columns too ' 'Arguments: session: The 'Each found document is displayed in a single line 'columns defines the document fields interested in and is used 'as the header for the columns too ' 'Arguments: session: The DocuWare session ' resultList: The result list 'Return: none ' Dim opened As Boolean Dim line As Integer Dim dialog As ScriptDialog Dim accepted As Boolean Dim headerline As Array Dim columnsCount As Integer Dim i As Integer Dim theTitle As String opened = False headerline = Array() columnsCount = columns.size For i = 1 To columnsCount Step 1 theTitle = columns( i - 1 ) headerline( i - 1 ) = Array( theTitle, 100 ) Next dialog = New Joops.Scripting.ScriptDialog dialog.title( "Results of query" ) dialog.addTable( Call DocuWare.Results ( session, resultList, columns ), columns: headerline, named: "table", left: 4, top: 13, width: 585, height: 203 ) dialog.addActionButton( "If opened = True Then Call DocuWare.Close ( session, resultList ) opened = False End If line = dialog.selectionIndex( ""table"" ) If line > 0 Then line = line - 1 opened = Call DocuWare.Open ( session, resultList, line ) End If", named: "open", left: 7, top: 223, width: 80, height: 30, default: False, label: "ffnen..." ) dialog.addAcceptButtonLeft( 509, top: 223, width: 80, height: 30, default: True ) dialog.width( 592 ) dialog.height( 259 ) dialog.help( "table", with: "Zeigt die Dokumente des Objektes" ) dialog.help( "open", with: "ffnet das markierte Dokument" ) accepted = dialog.open If opened = True Then Call DocuWare.Close ( session, resultList ) End If SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSessionSmallCOM.DocuWare_ToolKit_Type_Library.DWTKResultListArray vz"&*DefaultUsernameDefaultUsername 'Answer the default username for login to Docuware 'Change the username fitting your DocuWare installation ! ' 'Return: String Return "admin"vz6:>DefaultPassword.2DefaultPassword 'Answer the default password for login to Docuware 'Change the password fitting your DocuWare installation ! ' 'Return: String Return "admin"vzJNRDefaultExportDirectoryBFDefaultExportDirectory 'Answer the default directory for exports 'Change the archive path fitting your DocuWare installation ! ' 'Return: String (the directory name) Return stepscheduler.userEnvironment( "TEMP" )vz^bfDefaultArchiveVZDefaultArchive 'Answer the default archive (depends on the Docuware installation path) 'Change the archive path fitting your DocuWare installation ! ' 'Return: String (the default archive) Return "E:\DocuWare\ContentServer\admin\cb1d3da6-291d-4c02-b0fc-9ff31ad28054\DokPool.ADF"vzrvStartjn:Start ( user As String, password As String ) 'Open the Docuware session 'Arguments: user: The username ' password: The password 'Return: DWTKSession: The opened Docuware session Library "..\library\docuware.pcl" Dim TKSession As SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession Dim bDW4_Running As Integer Dim iTKError As Integer If Call DocuWare.IsInstalled ( True ) = True Then TKSession = New SmallCOM.DocuWare_ToolKit_Type_Library.DWTKSession iTKError = TKSession.isDocuWareRunning( bDW4_Running ) If bDW4_Running = 0 Then iTKError = TKSession.startDocuWare( user, strPassWord: password, timeOutInSeconds: 120 ) If iTKError <> 0 Then MsgBox( "Could not start DocuWare" ) Return Null Else Delay( 500 ) End If End If End If Return TKSessionStringStringz~vzIsInstalledIsInstalled ( talkative As Boolean ) 'Test wether DocuWare is installed 'and notifies the user if not installed and silent is False ' 'Return: Boolean Dim notInstalled As Boolean notInstalled = IsNull( stepscheduler.environment( "Software/DocuWare/DocuWare/500/MAINWINDOW/ToolbarSize", in: "HKEY_CURRENT_USER" ) ) If ( notInstalled = True ) And ( talkative = True ) Then MsgBox( "DocuWare is not installed", , vbCritical ) End If Return notInstalled = FalseBooleanvz2Rv"Ff.BVjvzZ