METHOD AND APPARATUS FOR SCANNING AND MANAGING DOCUMENT IMAGES

Abstract: A document management system wherein efficient and high-speed inputting of a voluminous number of documents is facilitated by means of a document separator, where said document separator contains a predetermined unique graphic image, which said image is interpreted by said system to perform a predetermined set of tasks. A document management system wherein said system is modular in design and permits user to select individual software components to be used with said system.

Description: METHOD AND APPARATUS FOR SCANNING AND MANAGING DOCUMENT IMAGES CROSS-REFERENCE TO RELATED APPLICATIONS The present application claims the benefit of 35 U.S.C. 111(b) provisional application Serial No. 60/029,425 filed October 22, 1996, and Serial No. 60/028,985, filed October 22, 1996, entitled Method and Apparatus for Scanning and Managing Document Images and Method and Apparatus for Computer Instruction Via Digitized Images. Both of these provisional applications are incoφorated by reference, as if fully set forth herein. STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT Not applicable. BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to a method and apparatus for a scanning and document management system using hardware and computer software technology. More particularly the present invention relates to the industry catering to users of document management systems and instruction of computers via digitized images. Description of Related Art The document management industry is constantly struggling with problems associated with efficient and cost-effective management of voluminous documents. The industry lacks cost-efficient computerized document management system capable of handling the input of a voluminous number of documents into a computer system. Thus one of the biggest stumbling blocks with the present technology is the inability to quickly and efficiently input voluminous number of documents into an imaging database. Current document management systems employ a complicated arrangement of user interfaces that require extensive training in order to adequately utilize the system. Databases with complicated user interfaces are very expensive to implement in an organization. This presents a cost barrier to an organization contemplating installation of such a system. Another shortcoming of the state of the art is the lack of a self-configuring database. The problem to be solved is in the design and implementation of a system that allows all technical functions to be handled by the program behind the scenes and keep the user interface as simple as possible. A simple user interface allows the performance of various different tasks behind the scenes by a simple click of a mouse button. Every such step that can be performed behind the scenes cuts down the cost of implementation and use. For example, the scanning of documents into the system involves many different tasks. The economic advantage of such an improvement over the prior art is the ability to use low-level employees to run the system without the need for any specialized expensive training and knowledge. The following references are hereby incorporated by reference in their entirety: (1) Dan Haught & Jim Ferguson, Microsoft Jet Database Engine Programmer's Guide. Microsoft Press, 1995 (2) Michelle A. Poolet & Michael D. Reilly, Access95 Cient/Server Development. QUE Coφoration, 1996 (3) James D. Murray & William VanRyder, Encyclopedia of Graphics File Formats. O'Reilly & Associates, 1994 (4) Michael Amundsen & Curtis Smith, Teach Yourself Database Programming with Visual Basic 4 in 21 Days. Sam's Publishing, 1996 (5) Zane Thomas Et al, Visual Basic 4 How -To. The Waite Group Press, 1995 BRIEF SUMMARY OF THE INVENTION The present invention relates to a method and apparatus for a scanning and document management system using hardware and computer software technology. More particularly, the present invention relates to an efficient methodology for scanning, generating instructions to be performed by a computer based on unique images digitized into the computer, converting to editable and searchable text, organizing and separating in electronic storage, labeling, annotating, viewing, accessing, manipulating, searching and printing of documents. A document consists of one or more pages or sheets containing text and/or graphic symbols. The pages or sheets comprising a document may be derived from any source, including scanned pages and captured video. A document may be in color, in black and white or both. The invention is useful for various commercial applications such as for example in a law practice for case litigation support imaging database to keep track of a plurality of documents produced during litigation. The present invention comprises a scanning and document management system with a mechanism for generating instructions to be performed by a computer based on unique images digitized into the computer, which preferably includes a scanning device electronically coupled to software-enabled computer. In the preferred embodiment, the enabling software for scanning, converting to editable and searchable text, organizing and separating in electronic storage, labeling, annotating, viewing, accessing, manipulating, searching, and printing of documents is resident on the computer. However, as one skilled in the art will appreciate, the software module for controlling the scanning device may be loaded as part of the scanning device, or scanning device and computer may be loaded with portions of the software module. The method and apparatus for generating instructions to be performed by a computer based on unique images digitized into the computer is facilitated by a unique graphic pattern embodied on a physical medium, such as a sheet of paper or video tape. The image is electronically digitized into a computer. For example, the image on sheet of paper is digitized by scanning the sheet into the computer. Similarly, the image on a video tape may be digitized into the computer by processing the analog video signals through a commercially available hardware add-on board installed in the computer. The add-on board contains electronic circuitry capable of converting analog video signals to digital video signals. Commercially available presentation software permits viewing of the digital video on the computer monitor. Additionally, the software contains functionality to freeze a particular video frame to save as an individual digitized image. This image may contain a unique graphic pattern designed to provide one or more instructions to the computer. A special software module examines and inteφrets the digitized image and thus produces one or more computer instructions. The computer executes the generated instructions to produce a desired result. An example of a practical application of this invention is in the use of a physical document separator, containing a unique graphic pattern (image), to mark the beginning and end of each document in a large volume of documents scanned collectively into a computer as a single electronic file. A software module is used to examine and recognize the document separator images and thus produce and store a separate electronic file for each individual document contained in the single larger electronic file containing a plurality of documents. This is particularly desirable in various commercial applications such as in a law practice case litigation support imaging database where large volumes of documents are scanned to be electronically managed and used. BRIEF DESCRIPTION OF THE DRAWINGS A better understanding of the present invention can be obtained when the following detailed description of the preferred embodiment is considered in conjunction with the following drawings, in which: Figure 1 is a block diagram of a computer system with attached accessories according to the present invention; Figure 2 is a flowchart depicting the Document Separator logic of the preferred embodiment of the present invention; Figure 3 is a screen shot showing the PC START screen; Figure 4 is a screen shot showing the Main Information Screen (MIS); Figure 5 is a screen shot of Watermark Professional Editor; Figure 6 shows the contents of the CDINFO.DAT file; Figure 7 is a screen shot of the Briefing Tool; Figure 8 is a screen shot of the Transcript Viewer; Figure 9 is a screen shot of the ISYS Query screen; Figure 10 is a screen shot of the ISYS Search screen; Figure 11 is a screen shot of the Word Wheel search screen; Figure 12 is a screen shot of the System Settings screen; Figure 13 is a screen shot of the Preferences screen; Figure 14 is a screen shot of the Report Names screen which enables running of reports; Figure 15 is a screen shot of the Report Names screen which enables naming of reports; Figure 16 is a screen shot of the Duplicates Screen; Figure 17 is a screen shot of the Exhibit List screen; Figure 18 is a screen shot of the Litigation Bates Number Label Maker screen; Figure 19 is a screen shot of the Litigation Document Number Label Maker screen; Figure 20 is a screen shot of the Tempest Image Printer screen; Figure 21 is a screen shot of Luke's Watermark Scan Utility screen; Figure 22 depicts the Document Separator of the preferred embodiment; Figure 23 is an example of a multi-page TIFF file; Figure 24 shows a page divided into sixty-four sections; Figure 25 shows further division of the sixty-four sections into four quadrants; Figure 26 is an overlay of the 64 sections and 4 quadrants on a document page; Figure 27 is an overlay of the 64 section and 4 quadrants on the designated Document Separator; Figure 28 shows documents separated after execution of the Document Separator module; Figure 29 is a screen shot of the Watermark Exhibit Scan Utility; and Figure 30 is a screen shot of Luke's Automated OCR'ing Utility. DETAILED DESCRIPTION OF THE INVENTION According to the preferred embodiment, software for the present invention is developed using Microsoft's Visual Basic programming language in 32-bit mode. The software portion of the preferred embodiment uses Microsoft Jet as the database engine. Referring first to Figure 1, an illustrative computer system 1-100 which is programmed according to the present invention and which operates according to the present invention is shown. The computer system 1-100 generally comprises a video display system 1-110, a keyboard 1-120, and a mouse 1-130. The computer system 1-100 also preferably includes various standard components, including at least one central processing unit (CPU), memory, a hard drive, a CD-ROM drive, a floppy disk drive, one or more buses, and a power supply. The computer system 1-100 of the preferred embodiment, includes a 200 Mhz Pentium MMX CPU, 32 megabytes of random access memory (RAM), 4 gigabytes of hard disk space, a 24X CD-ROM drive, 3.5" 1.4 megabyte floppy disk drive, a 17 inch monitor with 1024x768 resolution and a similarly equipped video card. In the preferred embodiment, the software program is stored on a CD-ROM disk 1-400, floppy disks 1-500 and/or hard drive of the computer 1-100 for execution by the CPU. The preferred embodiment of the present invention also includes a high-speed scanner 1-200, such as the commercially available Fujitsu scanner M3093GX, connected to the computer system 1-100. The preferred Fujitsu scanner is rated with a scanning speed of 27 pages per minute and is capable of 200 to 400 DPI resolution. Alternatively, any industry standard, i.e., TWAIN compliant, scanner with scanning speed of 24 to 30 pages per minute and 200 to 400 DPI resolution will satisfy the requirements of the preferred embodiment. The preferred embodiment uses the optional sheet feeder 1-210 of the scanner 1-200 to facilitate high speed scanning of documents into the system. The present invention preferably implements a document separator 1-300 placed at the end of each document to separately define the beginning and end of each document in a stack. A high-speed laser printer 1-600, also preferably is attached to the computer system 1- 100. The preferred embodiment uses the foregoing components to practice the present invention, as described below. One skilled in the art will understand, however, that modifications or omissions may be made to the list of preferred components without departing from the principles of the present invention. The preferred embodiment of the present invention uses software containing various programming modules. The software portion of the preferred embodiment of the present invention is incoφorated in its entirety and attached as the Appendix. Referring now to page 4 of the Appendix, the PC START module functions as the main menu for the database management system. The PC START module is an overlay program that acts as the master control program to manage a plurality of databases. In the preferred embodiment, each document database contains information on a lawsuit or legal case, although the present invention has other applications. Referring now to Figure 3, the PC START screen provides the user with options to perform various functions on each case database. For example, the user can select functions such as Load Case 3-100, Create Case 3-200, Delete Case 3-300, Repair Case 3-400 and Compress Case 3-500. Furthermore, the user can perform various system administration functions by selecting System Admin 3-600, produce labels by selecting Make Labels 3-700 or print documents by selecting Print Docs 3-800. The Current Cases list- box 3-900 permits the user to select which case database(s) will be impacted by selection of one or more of the foregoing functions. Referring now to pages 2 to 3 of the Appendix, the Load Case module enables the user to load the selected case 3-900 into the computer system's memory 1-100. In order to load a case, the case must exist in the Current Cases list-box 3-900. The Main Information Screen (MIS), Figure 4, is displayed upon selection of the Load Case 3-100 option from the PC START screen. (Figure 3). The MIS, Figure 4, contains the document image and document briefing information. Document briefing is accomplished by the entry of summary text into various fields on the MIS such as "To" 4-110, "From" 4-120, "CC's" 4-130, "Description" 4- 140 and "Comments" 4-150. Each of the foregoing briefing fields can be searched while in the MIS, Figure 4, by simply double-clicking on the desired field to search. Case Issues 4-200 on the MIS, Figure 4, enable the user to designate special characteristics of the currently displayed document in document thumbnail 4-300. The special characteristics are designated by placing a checkmark in the box provided to the right of each Case Issue 4-200. The use of Case Issues enables a novice user to produce sophisticated reports without any programming on the part of the user. For example, the user can easily produce a report containing all documents in the case database which involve expert testimony. Pages 15 to 17 of the Appendix show the programming logic to produce the reports based on case issues defined and selected by the user. Case Issues 4-200 are user-defined and thus are not predetermined by the system. The user defines case issues relevant to a case database in the Preferences screen, Figure 13. Referring now to page 41 of the Appendix, the Preferences screen, Figure 13, is selected by clicking on the Settings button 12-200 of the System Settings screen, Figure 12. In the Preferences screen, Figure 13, the user performs a one-time setup of chosen case issues by entering a case issue in each field of the data entry row 13-100. The case issues entered in the data entry row 13-100 are relationally connected to the Case Issues 4-200 on the MIS, Figure 4, the report screens, Figures 14 and 15, and all associated program code and tables. The Preferences screen, Figure 13, additionally permits the user to determine system folders 13-200 in which files related to a particular case database will reside on the computer system 1-100. Referring now to page 15 of the Appendix, the document thumbnail 4-300 will be displayed in an individual window if the user double-clicks on the document thumbnail 4-300 using the mouse 1-130 or selects the Go To button 4-410. Any commercially available image-viewing program may be used to display the thumbnail document 4-300. The preferred embodiment of the present invention uses commercially available Watermark Professional Edition image viewer. While in the image viewer, Figure 5, the document display size may be changed to suit the user's needs. Furthermore, among other things, the user can print the document, annotate the document using text or audio annotations and highlight significant portions of the document. Referring now to page 53 of the Appendix and Figure 6, the system is capable of automatically determining the location of a user-requested document in a multi-volume CD- ROM document image database. This feature is facilitated by the system's ability automatically keep track of the location of all documents as they are scanned into the system, even if more than one CD-ROM is required to store the scanned document images. This functionality is useful in circumstances where the user's computer system has a single CD- ROM drive. The functionality is particularly helpful on laptop computers, which customarily have a single CD-ROM drive. The preferred embodiment maintains two different versions of each document in each case database: (1) the scanned image and (2) the full-text OCR version. The scanned image version is displayed in thumbnail mode 4-300 and using the image viewer program. The scanned image version is the more complete and accurate version of a document because it is essentially an identical image of the document as it was scanned into the system. While the scanned image is ideal for viewing an identical copy of the original document, the scanned image lacks the capability to be searched for text. The physical limitation of the scanned image version necessitates a full-text version of the document. The full-text version is obtained though the use of optical character recognition (OCR) software to convert the scanned image into a text-only file (see discussion below on the OCR process). Referring now to pages 26 to 36 of the Appendix, the Briefing Tool, Figure 7, of the preferred embodiment enables the user to view the scanned image of the document thumbnail 4-300 by clicking on the Brief button 4-420 on the MIS, Figure 4. The Briefing Tool, Figure 7, differs from the image viewer, Figure 5, in that the Briefing Tool displays the document image at all time while it is open. It is desirable to have the functionality of an image viewer that remains on top of all other windows at all times because it permits the user to have both the MIS, Figure 4, and Briefing Tool, Figure 7, up on the monitor at the same time to facilitate efficient briefing of the document in the MIS. This functionality facilitates multiple users briefing the same case database at the same time without having the need to have actual physical document copies accessible to each briefer. Additionally, the Briefing Tool reduces the likelihood of lost physical document copies. As evident from the programming source code on page 26 of the Appendix, the Briefing Tool, Figure 7, of the preferred embodiment is written in TMS/Sequia OCX technology. Referring now to pages 13 and 69 to 83 of the Appendix, the Transcript Viewer, Figure 8, of the preferred embodiment is an ASCII transcript viewer. It displays an entire page of a deposition proceeding at a time. The Transcript Viewer is initiated by clicking on the Transcr button 4-440 on the MIS, Figure 4. The Transcript Viewer has the capability to automatically recognize various transcript types, such as different transcript types received from court reporters, and to automatically perform all necessary formatting and loading into the system. This feature is particularly desirable because state of the art systems lack this feature and thereby require significant labor to format transcripts prior to use on other state of the art document management systems. The Transcript Viewer has a Find Word 8-100 feature, which enables the user to search transcripts for particular text strings. Another desirable feature of the Transcript Viewer in this preferred embodiment is the ability to use it in conjunction with any word processing software, such as Microsoft Word or Corel's WordPerfect. The combination use enables the user to highlight any selected portion of a transcript, then click on the Copy button 8-200 in the Transcript Viewer. The copied information can then be pasted into the word processor. Significantly, the Copy 8-200 function accomplishes much more than the average cut and paste routine. Here, the Copy 8- 200 function provides additional valuable information relating to the copied transcript text. Specifically, the Copy 8-200 function automatically generates document reference including information such as the page and line number of the copied text and the name of the transcript. This automatic functionality facilitates faster deposition summaries and easier incoφoration of deposition quotes in litigation pleadings. Furthermore, the Transcript Viewer allows condensed printing of transcripts - up to four pages of transcripts on a single physical printed page. Referring now to pages 14 to 15 of the Appendix, the ISYS Query screen, Figure 9, of the preferred embodiment enables the user to perform full-text searches on the OCR version of the documents in the case database. The ISYS Query screen, Figure 9, is initiated by clicking on the FullText button 4-470 on the MIS, Figure 4. The preferred embodiment of the present invention uses a commercially available search engine called ISYS, produced by Odyssey Development Coφoration, for performing the full-text searches. The third party ISYS Search screen, Figure 10, is initiated by clicking on the Q button 9-100. The user enters queries in the query field 10-100 using search connectors 10-200 as needed. The user may choose to use the Word Wheel icon 10-300 to search for the number of occurrences of any given specific word. The Word Wheel Search screen, Figure 11, is initiated when the user clicks on the Word Wheel icon 10-300 on the ISYS Search screen, Figure 10. The user enters the specific word to search for in the query field 11-100 in Figure 11. The user must select one of the search methods 11-200. The self-explanatory choices are "Starts with" and "Sounds like." The result of the single-word Word Wheel search is displayed in the result list-box 11-300. Referring now to page 12 of the Appendix, the Add button 4-450 and the Delete button 4-460 on the MIS, Figure 4, of the preferred embodiment enable the user to perform standard add and delete processing of case database records. Referring now to pages 13 and 20 to 20 of the Appendix and pages 42 to 52 of the Appendix, the Reports button 4-480 on the MIS, Figure 4, enables the user to print reports as defined by the user's System Settings, Figure 12, Reports button 12-300 and Rpt Names button 12-400. Report Screen, Figure 15, enables the user to name reports. Report Screen, Figure 14, enables the user to run reports. Referring now to page 13 of the Appendix, the Print Ser button 4-490 on the MIS, Figure 4, of the preferred embodiment provides the functionality to produce an image of an index card that looks exactly like the MIS, Figure 4. Referring now to page 37 of the Appendix, the Duplicates button 12-500 on the System Settings screen, Figure 12, performs a check for duplicate records in the case database. The result of the duplicates check is displayed on the Duplicates Screen, Figure 16. The Duplicates Screen is a grid type screen that includes an entry for every document in the database. The duplicates checking routine performs approximately 14 separate checks on document numbers. Duplicate records are grouped together based on document numbers. Duplicate records are highlighted and deleted by pressing the delete key. The Duplicates Screen has the added functionality of providing the database administrator the capability to perform mass maintenance functions on all records in the database. For example, the administrator can globally make changes to all data in a case database. Various reports can also be produced using the Duplicates Screen. The reporting capabilities found here, i.e., Figure 16, are separate and distinct from other reporting features of the system. All appearance changes on this screen, Figure 16, such as hiding various columns for printing puφoses, are temporary, while all data content changes, such as global find and replace, are permanent. Referring now to page 37 of the Appendix, the Exhibit List button 12-600 on the System Settings screen, Figure 12, displays the Exhibit List screen, Figure 17. The Exhibit List screen, Figure 17, allows the user to modify parts of the data for use in an automatic exhibit list which can be printed from the Report Screens, Figures 14 and 15. Referring now to pages 14 to 15 of the Appendix, the preferred embodiment of the present invention provides the user with the option of selecting the user's choice of full-text search engine Figure 9. The system of the preferred embodiment is designed to automatically detect what particular component is installed on the user's computer system 1-100 and to automatically develop necessary links to enable use of the installed components as the user's full-text search engine. Referring now to pages 1 to 2 of the Appendix, the Create Case module permits the user to add a new case database. A case database must be added to the computer system 1- 100 before any of the database actions listed in Figure 3 can be performed on the documents and the associated information which comprise a case database. A series of dialogue boxes step the user through the process of creating a new database. The procedure for adding a new case database is initiated by clicking on the Create Case button 3-200 on the PC START screen, Figure 3. Referring now to page 2 of the Appendix, the Delete Case module permits the user to delete a case database from the computer system 1-100. In order to delete a case, the case must exist in the Current Cases list-box 3-900 and must be selected by the user. The delete case function is password protected to prevent unauthorized deletion of case databases. A series of dialogue boxes step the user through the process of deleting a database. The procedure for deleting a case database is initiated by clicking on the Delete Case button 3-300 on the PC START screen, Figure 3. Referring now to pages 3 to 4 of the Appendix, the Repair Case module permits the user to perform various repair functions on a case database residing on the computer system 1- 100. In order to repair a case, the case must exist in the Current Cases list-box 3-900 and must be selected by the user. The Repair Case module corrects technical problems with the case database such as damaged or defective files. It is critical to repair a case when a damaged or defective file prevents the system from functioning as intended. A series of dialogue boxes step the user through the process of repairing a database. The procedure for repairing a case database is initiated by clicking on the Repair Case button 3-400 on the PC START screen, Figure 3. Referring now to page 1 of the Appendix, the Compress Case module permits the user to perform various maintenance functions on a case database residing on the computer system 1-100. In order to compress a case, the case must exist in the Current Cases list-box 3-900 and must be selected by the user. The Compress Case module performs tasks such as reorganization and defragmentation of the selected case database. During the normal course of use, case databases are added and deleted as needed. However, the system does not physically delete a case database and its associated files until the case database is compressed. Thus, it is desirable to compress a case to free up storage space occupied logically deleted files. Compressing a case improves overall performance of the system and allows faster processing of information contained in the case database. A series of dialogue boxes step the user through the process of compressing a database. The procedure for compressing a case database is initiated by clicking on the Compress Case button 3-500 on the PC START screen, Figure 3. Referring now to page 8 and 9 of the Appendix, the Make Labels module allows the user to print litigation label numbers based on either the Bates numbers stamped document production during litigation or case database system specific Document Number. Figure 18 demonstrates the preferred embodiment's form for Bates number based label maker and Figure 19 demonstrates the preferred embodiment's form for Document number based label maker. Referring now to pages 5 and 84 to 87 of the Appendix, the Print Docs module enables the user to perform high-speed document production. The module contains functionality which acts as a batch print utility for delayed or scheduled printing of scanned image files on the high-speed laser printer 1-600. The batch print capability of the Print Docs module is very useful as a cost-effective method for automated and scheduled high-speed document production. Referring now to Figure 20, the Tempest Image Printer screen enables the user to select one or more files to be printed. By simply clicking on check boxes, the system is capable of batching all files for deferred printing and production of selected documents on high-speed network printers. This feature eliminates costs associated with manual production of documents by clerks - a process that requires clerks to manually locate and copy selected documents for production. Current state of the art technology does not provide batch print capability in document management systems. Further performance enhancement may be realized by installing additional memory chips into the high-speed laser printer 1-600. The preferred embodiment of the present invention uses the commercially available Hewlett Packard 5Si model. However, the preferred embodiment uses a 5Si model with its standard memory upgraded to 32 megabytes. The upgraded 5 Si reduces the processing load on the computer system's 1-100 resources and effectively improves overall system performance. The present invention envisions a system whereby the batch print functionality may be easily expanded by one skilled in the art to enable multiple printers to simultaneously share the burden of printing high-volume batched documents. The accelerated print management produces significant time and labor savings. Referring now to pages 54 to 60 of the Appendix, Luke's Watermark Scan Utility module is the mechanism of the preferred embodiment of the present invention by which all documents that belong to a case database are scanned into the computer system 1-100. The documents are scanned into the computer system 1-100 using the attached high-speed scanner 1-200. Luke's Watermark Scan Utility screen, Figure 21, is displayed when the scanning utility module is initiated. The scanning utility of the preferred embodiment will work with any industry standard, i.e., TWAIN compliant, scanner. However, the utility can be modified to work with specific high-speed scanners. For example, the scan utility of the preferred embodiment includes special driver software for the preferred Fujitsu high-speed scanner. Scanner setup is accomplished by means of clicking on the Setup button 21-100 in Figure 21. The scan utility automatically links the scanned image into the case database and gives it a document number and bates label number. The automatic linking and setup of the scanned images into the case database is highly desirable because it saves significant manual effort that would otherwise be required. The Scan button 21-200 initiates scanning of as many documents as are in the scanner's 1-200 sheet feeder 1-210. The Single button 21-300 initiates scanning of only a single page of a document. The Scan90 button 21-400 makes a 90-degree orientation adjustment to a document as it is scanned into the system. This eliminates the need for the user to adjust the scanned image when viewing it. The Save button 21-500 permanently stores scanner settings. The scan utility keeps a running tab of all scanned images that have not yet been processed by the OCR routine, i.e., conversion to full- text version of the scanned image. This is desirable because the OCR list generated by the scan utility is used in the OCR process without having to manually determine which scanned images need to be OCRed. Referring now to pages 94 to 98 of the Appendix, the Document Separator module is designed to facilitate efficient scanning of large volumes of documents in a continuous stream. Documents are typically scanned one document at a time in order to signal to the system the end of one document and the start of another. Scanning one document at a time is a laborious and time-consuming manual procedure. It is desirable to perform continuous scanning of documents because it eliminates the need to manually signal the end of each document (containing one or more physical pages) and the start of the next document. In the preferred embodiment, continuous scanning of documents is achieved by placing a physical document separator between each of the documents before scanning. In the preferred embodiment the physical document separator, Figure 22, is a physical sheet of paper that contains a predetermined unique image pattern. All documents are then continuously scanned and saved as one multi-page electronic file, such as a TIFF file. Figure 23 shows an example of a continuous stream of documents separated by the designated uniquely patterned document separator. The document separator module examines and processes each multi-page TIFF file to produce individual documents and saves each such document as a separate electronic file. The logic of Document Separator, as used in the preferred embodiment, is described in the flowchart in Figure 2. Specifically, the process begins by loading and displaying each scanned image on the computer screen. The width and height of the scanned sheet is determined and the sheet is divided into sixty-four (64) sections, Figure 24. The 64 sections are further divided into four (4) quadrants, Figure 25. Figure 26 demonstrates overlay of the 64 sections and 4 quadrants on a page of a document. Figure 27 demonstrates overlay of the 64 sections and 4 quadrants on a page that is the designated document separator with the predetermined unique graphic pattern. Thereafter, the software module takes one thousand (1000) color samples or pixel values from each quadrant. Each color sample is examined and compared against the predetermined unique graphic pattern of the designated document separator to determine whether the scanned page is the designated document separator. If the scanned page does not correspond identically/substantially to that of the predetermined unique image, (the Document Separator template), the scanned page is marked as part of an ongoing document and the process is repeated again. However, if the page is the designated document separator, then the end of the current document is indicated and all scanned pages prior to the document separator are saved as a single document in a separate electronic file. Figure 28 displays the end result of the foregoing process for the example multi-page TIFF file shown in Figure 23. At the completion of the document separator routine, four documents are extracted in Figure 28 from the single multi-page TIFF file in Figure 23. This process is repeated until all documents have been separated in a similar manner. The utility of the present invention lies in part in time savings realized through continuous scanning of large volumes of plurality of documents using a highspeed scanner. Referring now to pages 61 to 66 of the Appendix, the Watermark Exhibit Scan Utility module is an automatic trial exhibit maker. It allows exhibit descriptions to be added as the documents are being scanned. Referring now to pages 67 to 68 of the Appendix, Luke's Automated OCR'ing Utility module enables the OCR software, such as Omni Page Pro, to run in a batch file mode at various scheduled times. It corrects errors and loads the assigned documents to the OCR program. Although the method and apparatus of the present invention has been described in connection with the preferred embodiment, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is intended to cover such alternatives, modifications, and equivalents, as can be reasonably included within the spirit and scope of the invention as defined by the appended claims. PROGRAM CODE SEE APPENDIX 1, PAGES 1 - 98 "orml - 1 PC START Cop y right (C) 1995 - 1997, Lu :e A. q ~ nre £. Michael L. Saltsman Last Modified on 05/9/97 All rights reserved. No portion of this program code may be altered, reproduced, used without written permission of the autnors Compile with 16 bit processor "GetModuleUsaσe " API does not orκ .ith WIN32 or Windows NT Option Explicit Dim Drive Path As String, CaseFileName As Striπα Private Declare Function GetMoαuleUsage% Lib "Kernel" (ByVal r_odu..e% ) Private SUP cmdCompress ClicicO Dim Retval As Integer, CaseToCcmpress As String, Compressed As String If Security () = 0 Then Exit Sub Retval = MsgBoxC'Do you want this case s to be compressed? " , 275, "Case Com press" ) If Retval = 6 Then CaseToCompress = Drive Path & Listl.Text & " mdb" Compressed = Drive Path & ' r2Temp .map' CompactDataoase CaseToCompress, Compressed Kill CaseToCompress ressed As Drive Path & Listl.Text & ".mdb" he case s compressed.", 0, "Compressed Case" Filel . Refresh UpdateL st UpdateButtons End Sub Private SUP c dCreateCase Clιcκ() If Security () = 0 Then Exit SUP Dim Y As Integer, Z As Integer, NewCaseName As String, OπgiπalFile As String Dim Anεr, CjrDrv, Msg, TmpPatn, KomeDir, ChrName As String, Characters As String Dim NewFile As String, TestFile As String NewCaseName = InputBox$ ( "Please type your case name. It can p e u p to eight letters long, you may use any letter(s), numper(s), or tne dasn '-' & /or tne un derscore ' ' symbols m your description.", "Case Name", "" ) If NewCaseName = "" Then Exit Sub If UCase (NewCaseName) = "DOCONTR" Then MsαBox "Please use anotner filename.", 0, "Reserved Case Name." NewCaseName = Left$ (NewCaseName , 8) Z = Len (NewCaseName) For Y = 1 To Z ChrName = Mιd$ (NewCaseName, Y, 1) Select Case UCase (ChrName; Case "A", "B", "C" "D" , "Ξ", "F", "G" , "H" , "I", " " , "K", "L", "M" , "N" ii O" "P" "Q" "R" "S" "T" "U" "V" "W" "X", "Y", "Z" ChrName = ChrName Case "0" "1". " ? " . "V "4" "^" "R" "7", "8" " c > " "-" "_" ChrName = ChrName Case Else ChrName = " " End Select Characters = Characters -r ChrName Next Y NewCaseName = Characters OrigmalFile = Drive Path & "docontr.mdb" NewFile = Drive Path & NewCaseName & " .mdb" TestFile = Dir (NewFile) If TestFile = " " Then FileCopy OrigmalFile, NewFile Else MsgBox "That case already exists. " Filel. Refresh U p dateList Forml UpdateButtons On Error Resume Next Set up error handler. CurDrv = Left(CurDιr, 2) 1 Get current drive letter. HomeDir = CurDir TmpPath = UCase (HomeDir & "\" Si NewCaseName) ' Make path specification. MkDir TmpPath ' Make new directory. TmpPath = UCase (HomeDir & "\" & NewCaseName "\IMAGES") MkDir TmpPath ' Make new directory. TmpPath = UCase (HomeDir & "\" & NewCaseName "\DOCS" ) MkDir TmpPath ' Make new directory. TmpPath = UCase (HomeDir & "\" & NewCaseName "\DEP0S") MkDir TmpPath ' Make new directory. Filel .Refresh UpdateList UpdateButtons End Sub Private Sub cmdDeleteCase Click () Dim CurDrv, Msg, TmpPath, FileKill, HomeDir, caseToDelete Dim Retval As Integer, ToDelete As String If Security 0 = 0 Then Exit Sub Retval = MsgBox ("Are you positive that this case is to be deleted?", 275, "C ase Deletion") If Retval = 6 Then ToDelete = Drive Path & Listl.Text & ".mdb" If InStr (Listl.Text, "DOCONTR") Then Exit Sub Kill ToDelete On Error Resume Next Set up error handler. CurDrv = Left(CurDιr, 2) ' Get current drive letter. Forml - 3 L = Shell (LoadAccess, 1) For l .WmdowState = 1 'Minimized While GetModuleUsage (L) > 0 Z = DoEvents () Wend Forml .WmdowState = 0 End Sub Private Sub cmdMinimize Click () Forml .WmdowState = 1 End Sub Private Sub CmdMklbl Click () Dim X As Integer, Z As Integer On Error Resume Next X = Shell ("LABEL.EXE" , 1) Forml .WmdowState = 1 'Minimized While GetModuleUsage (X) > 0 Z% = DoEvents () Wend Forml .WmdowState = 0 End Sub Private Sub cmdRer.ame Click () Dim Z As Integer, Y As Integer, NewCaseName As String, ChrName As String, Charac ters As String Dim OrigmalFile As String, NewFile As String, TestFile As String If Security () = 0 Then Exit Sub Dim dirToChange, dirToChangeTo , , NewCaseName = InputBoxS ( "Please type your case name It can Pe up to eigh t letters long, you may use any letter(s), numoer(s), or ^ the αasn '- & /or the un derscore ' ' sy oois m your description.", "Case Name", "" ) If NewCaseName = "" Then Exit Sub If UCase (NewCaseName) = "DOCONTR" Then MsαBox "Please use another filename.", 0, "Reserved Case Name. NewCaseName = Left$ (NewCaseName , 8) Z = Len (NewCaseName) For Y = 1 To Z ChrName = Mιd$ (NewCaseName, Y, 1) Select Case UCase (ChrName) Case "A" "B" "C", "D" , "Ξ" , "F", "G" , "H" , "I", "J", "K" , "L", "M" , "N" "O", "?", ''Q'\ "R"' "3"', 'T''', "V" ', "V", "W", "X", Y", "Z" ChrName = ChrName , „ Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "_" ChrName = ChrName Case Else ChrName = "" End Select Characters = Characters * ■ ChrName Next Y NewCaseName = Characters OrigmalFile = Drive Path & Listl.Text & ".mdb" NewFile = Drive Path & NewCaseName & ".mdb" dirTcChe.nge - CvrD r ύ "\" . Listl.Text S. ' ' \" dirToChangeTo = CurDir & "\" & NewCaseName & "\" TestFile = Dir (NewFile) If TestFile = "" Then Name OrigmalFile As NewFile MsgBox dirToChange MsgBox dirToChangeTo Name dirToChange As dirToChangeTo Else case alreaαy exists." Filel. Refresh UpdateList UpdateButtons End Sub Private Sub cmdRepaιr_Clιck ( ) Forml - 4 Dim Retval As Inteqer, CaseToRepair As String If Security () = 3 Then Exit Sub Retva = MsgBo ("Do you want this case is to oe repaired?", 275, "Case Repai r" ) If Retval = 6 Then Text & " mdb" "Repaired Case" End Sub Private Sub Form LoadO On Error Resume Next 1 center form Me. Left = (Screen. Width - Me. Width) / 2 Me. Top = (Screen. Height - Me. Height) / 2 pctLogo. Picture = LoadPicture ( "bac grnd.bmp" ) UpdateList If Dιr(Drιve Path & "DOCONTR.MDB") = "" Then cmdCreateCase . Enabled = False cmdDeleteCase. Enabled = False cmdLoadCase. Enabled = False cmdRename .Enabled = False cmdRepair .Enabled = False cmdCompress .Enabled = False cmdSysAdm . Enabled = False End Sub Private Sub Listl Click () If Listl.Text = "DOCONTR" Then cmdDeleteCase . Enableα = False cmdRename . Enapleα = False Else cmdDeleteCase. Enabled = True cmdRename . Enabled = True cmdRepair .Enabled = True cmdCompress . Enabled = True End If cmdSysAdmm. Enabled = True cmdLoadCase. Enabled = True E-rf Sub Private Sub Listl DblClickO cmdLoadCase .Value = True Rem cmdSysAdmm. Value = True End Sub Private Function Security () Security = 0 Ans = InputBox ( "Enter your Paper Chaser Administration Password", "Security") If Ans = "Rufus" Or Ans = "rufus" Then Security = 1 Else MsgBox "Access Prohibited. Incorrect Password", 16, "Security Check" End If End Function Private Sub UpdateButtons ( ) cmdLoaαCase . Enanleα = False Forml - 5 cmdDeleteCase .Enabled = False cmdRename .Enabled - F l c cmdRepair .Enabled = False cmdCompress .Enabled = False cmdSysAdmin. Enabled = False End Sub Private Sub UpdateLis () Dim X As Integer, I As Integer, CaseName As String, Test As String Listl . Clear For I = 0 To Filel .ListCount - 1 CaseFileName = Filel .List (I) For X = 1 To 8 Test = Mid$ (CaseFileName, X, 1) If Test = " . " Then Exit For CaseName = CaseName + UCase (Test) Next X Listl .Addltem CaseName CaseName = " " Next I End Sub Private Sub CmdSysAdmin Click () Dim X As Integer, Z As Integer, LoadAccess As String, Database As String On Error Resume Next Database = Listl.Text & ".mdb" LoadAccess = "msarn200.exe " & Database & " /ini pchaser.ini" X = Shell (LoadAccess , 1) Forml . indowState = 1 'Minimized While GetModuleUsage (X) > 0 Z% = DoEvents () Wend Forml .WindowState = 0 End Sub Private Sub PrintDocs_Click () Dim X As Integer On Error Resume Next X = Shell ("TIFFPRINT.EXE" , 1) Re Forml .WindowState = 1 'Minimized Rem While GetModuleUsage (X) > 0 Rem Z = DoEvents () Rem Wend Rem Forml .WindowState - 0 End Sub frmStartUP - 1 Private Sub Form Click () Timarl .Enabled = False Load Forml Forml . Show Unload frmStartUP End Sub Private Sub Form Load ( ) On Error Resume Next If App. Prevlnstance Then Beep End- End If rmStartUP . Show Imgl . Picture = LoadPicture (" start-up . bmp" ) 'Imgl.Left = (Screen .Width - Imgl. Width) / 2 'Imgl. Top = (Screen. Height - Imgl. Height) / 2 Me. Left = (Screen. idth - Me. idth) / 2 Me. Too = (Screen. Height - Me. Height) / 2 End Sub Private Sub Timerl Timer ( ) Timerl . Enabled = False Load Forml Forml . Show Unload frmStartUP End Sub Forml - 1 ' Label. Maker Copyright (C) 1995, 1996 Luke A. Spence ' Last modified on 01/02/96 ' All rights reserved. No portion of this cprogram code may be altered, ' reproduced or used without written permission of the authors. Option Explicit Deflnt A-Z fix$ fix$ gth% gth% erLength% r% nted% D m startL neNumber% Dim startColumnNumber% Dim bateStampNumber& Private Sub cmdExit_Clic () End End Sub Private Sub cmdHelp Click () frmHelp.Left = (Screen. Width - frmHelp. Width) / 2 frmHelp.Top = (Screen. Height - frmHel .Height) / 2 Load frmHelp frmHelp. Show 1 End Sub Private Sub cmdPrint_Click () PπntLabels End Sub Private Sub DetermineCenter () If Len(txtPrefix) = 0 Then 'Adding a space to the end of paddedPrefix = "" 'the prefix, if it exists, to Else 'keep it and the bateStampNumber paddedPrefix = txtPrefix & " " 'one space apart on the printout End If prefixLength = Len (paddedPrefix) If Len(txtSuffix) = 0 Then 'Adding a space to the paddedSuffix = "" 'beginning of the suffix, if Else 'it exists, to keep it and pa ^-^ uffix - '' " &_ txtSuffi 'the batεSt mpNumbe-; one End If 'space apart on the printout suffixLength = Len (paddedSuffix) If optNoSpacing = True Then startNumberLength = Len (txtStartNumber) Else startNumberLength = 7 End If ' the following determines the center adjusted = 8 - ( (prefixLength + startNumberLength + suffixLength) \ 2) End Sub Private Sub Form Load ( ) cmdPrint .Enabled = False Forml - 2 End Sub Private Sub optNumOfLabels_Clιck ( ) txtNumRequired = " " End Sub Private Sub optNumOfPages_Clιck ( ) txtNumRequired = " " End Sub Private Sub optPrefιxNO_Clιck (Value As Integer) UpdateLength End Sub Private Sub optPref xYES_Clιck (Value As Integer) UpdateLength End Sub Private Sub optsuffιxNO_Ciιck ('value As Integer) UpdateLength End Sub Private Sub optsuffιxYES_Clιc (Value As Integer) UpdateLength End Sub Private Sub PrmtLabelsO pnlDisplay. Caption = "Printing..." On Error Resume Next If txtStartAtColumn = "" Then txtStartAtColumn = 1 If txtStartAtRow = "" Then txtStartAtRow = 1 startLmeNumber = txtStartAtRow startColumnNumber = txtStartAtColumn DetermmeCenter Printer . FontName = "Courier" Printer .FontSize = 12 Printer . FontBold = True labelsPrinted = 0 bateStampNumber& = txtStartNumber pages = lblNumOfPages + 1 For paqe = 1 To pages For ImeNumber = startLmeNumber To 20 If startLmeNumber > 1 Then For skipLme = 1 To startLmeNumber - 1 Printer . Print "": Printer . Print "": Printer . Print "" Next skipLme End If startLmeNumber = 1 Printer. Prim: "" • Printer . r.mt "". Printer, ΓΠUL "" For column = startColumnNumber To 4 startColumnNumber = 1 If Int (labelsPrinted) >= Int (IblNumOfLabels) Then GoTo Done If column = 1 Then skip = adiusted + 2 If column = 2 Then skip = adiusted + 23 If column = 3 Then skip = adiusted + 43 If column = 4 Then skip = adiusted + 63 Printer . Print Tab(skιp); Printer. Print paddedPrefix; If optZeros = True Then Printer .Print Format$ (bateStampNumberS:, "0000000") Elself optSpaces = True Then Printer. Print Format$ (bateStampNumber&, "@@@@@@@") Else Printer. Print Format$ (bateStampNumberk, "#######") End If Forml - 3 Printer. Print paαdedSuffix; If bαteStαmpNumberk = 9999999 Then column = 4 lmeNumber = 20 page = pages End If bateStampNumber& = bateStampNumber& + 1 labelsPrinted = labelsPrinted + 1 skip = skip + 20 ' adds 20 spaces to the 'Tab' Next column Next lmeNumber Printer . NewPage Next page Printer . EndDoc Exit Sub Done : age oc aption = "Print job sent to the printer." End Sub Private Sub txtNumRequιred_Change () On Error Resume Next If optNumOfPages = True Then IblNumOfLabels = txtNumRequired * 80 lblNumOfPages = txtNumRequired End If If optNumOfLabels = True Then IblNumOfLabels = txtNumRequired lblNumOfPages = Format$ ( (txtNumRequired / 80), "### .##": End If If txtNumRequired = "" Then IblNumOfLabels = "" lblNumOfPages = " " End If If txtStartNumber <> "" And txtNumRequired <> "" Then cmdPrmt .Enabled = True Else cmdPrmt . Enabled = False End If End Sub Private Sub txtStartAtColumn_Change ( ) On Error Resume Next If txtStartAtColumn. Text < 1 Then txtStartAtColumn. Text = π π If txtStartAtColumn. Text > 4 Then txtStartAtColumn. Text = End Sub Private Sub txtStartAtRow_Change () On Error P.ecu- n e .Text If txtStartAtRow. Text < 1 Then txtStartAtRow. Text = "" If txtStartAtRow. Text > 20 Then txtStartAtRow. Text = "" End Sub Private Sub txtStartNumber Change ( ) If txtStartNumber <> "" And txtNumRequired <> "" Then cmdPrmt .Enabled = True Else ( - dPrmt .Enabled = Fal<=e End If End Sub Private Sub txtStartNumber_KeyPress (KeyAscii As Integer) Select Case KeyAscii Case 48 To 57 ' do nothing, valid entry Forml - 4 Case 8 ' backspace character Case Else KeyAscii = 0 '48 End Select End Sub Private Sub UpdateLength ( ) If optPrefixYES = True Then If optSuffixYes = True Then SUFFIX S PREFIX 'PREFIX txtPrefix. MaxLength = 3 txtPrefix.Left = 480 txtPrefix. Width = 615 txtPrefix. Visible = True lblPrefix.Left = 480 lblPrefix. Visible = True 'SUFFIX txtSuffix. MaxLength = 3 txtSuffix.Left = 3120 txtSuffix. Width = 615 txtSuffix. Visible = True lblSuffix.Left = 3120 lblSuffix. Visible = True 'NUMBER txtStartNumber . Left = 1440 lblStartNumber . Left = 1440 Else ' SUFFIX txtSuffix. Visible = False PREFIX lblSuffix. Visible = False txtSuffix = "" ' PREFIX txtPrefix. MaxLength = txtPrefix.Left = 600 txtPrefix. Width = 1300 txtPrefix. Visible = True lblPrefix.Left = 600 lblPrefix. Visible = True 'NUMBER txtStartNumber. eft = 2300 lblStartNumber. Left = 2300 End If Elself optSuffixYes Then SUFFIX txtPrefix. Visible = False lblPrefix. Visible = False txtPrefix = "" ' SUFFIX txtSuffix. MaxLength = 7 txtSuffix.Left = 2300 txtSuffix. Width = 1300 txtSuffix. Visible = True lblSuffi v .τ. o ft ~ 23 n lblSuffix. Visible = True 'NUMBER txtStartNumber . eft = 600 lblStartNumber . Left = 600 Else NONE txtPrefix. Visible = False lblPrefix. Visible = False txtPrefix = "" txtSuffix. Visible = False lblSuffix. Visible = False txtSuffix = "" txtStartNumber . Left = 1400 lblStartNumber . Left = 1400 End If End Sub frmStartUp - 1 ' Copyriqht (C) 1995, 19^ Luke Spence 1 Last modified on 01/02/96 Private Sub Form Click () Timerl .Enabled = False Load Forml Forml . Show Unload frmStartUp End Sub Private Sub Form LoadO frmStartUp. Left = (Screen. Width - frmStartUp .Width) / 2 frmStartUp. Top = (Screen. Height - frmStartUp .Height) / 2 frmStartUp . Show Forml. Left = (Screen. Width - Forml. Width) / 2 Forml. Top = (Screen. Height - Forml .Height) / 2 Load Forml End Sub Private Sub Timerl_Timer () Load Forml Forml . Show Unload frmStartUp End Sub frmHelp - 1 ' Copyriqht (C) 1995,1996 Luke Spence ' Last modified on 01/02/96 Option Explicit Private Sub cmdReturn_Click ( ) Unload frmHelp End Sub Forml - 1 ' Paper Chaser ' Copyright (C; 1S3C - 1327, Michael L. Saltsman 'All rights reserved. No portion of this program code may be altered, used or re produced 'without written permission of the author. Option Explicit ' declare API functions Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVa 1 nDπve As String) As Long ' declare API constants Const DRIVE CDROM = 5 Const DRIVE FIXED = 3 Const DRIVE RAMDISK = 6 Const DRIVE REMOTE = 4 Const DRIVE_REMOVABLE = 2 Public DriveType As String Public CurrentDisk As Variant Public Dj._j Num as Variant Dim CDROM As String Public MyCriteria As String Dim ImaqePath As String Public NoC As Variant D m StrBuffer As String * 250 Private Sub CmdAdd Click () Datal . Recordset .AddNew Datal . Recordset . Update Datal . ecordset . MoveLast Go To to re-enter document num Private Sub CmdDelete Click () Dim Msg As String, Title As String, Style As Variant, Response As Variant, MyStr inq As String Msq = "Delete this entry?" ' Define messaqe. Style = vbYesNo T vbQuestion + vbDefaultButton2 ' Define buttons. Title = "Delete Entry Confirmation" ' Define title. Response = MsgBox(Msg, Style, Title) If Response = vbYes Then ' User chose Yes. ^ rmg = "Yes" ' Perform some action. Datal . Recordset . Delete Datal .Refresh Data2.Refresh Else ' User chose No. MyStπng = "No" ' Perform some action. Beep Exit Sub End If End Sub Private Sub CmdEnd Click () End End Sub Private Sub CmdGoto Click () Dim MyCriteria As String FrmSearch.Labell .Caption = "Enter the Document # to find:" Forml - 2 qs FieldName$ = " [Doc Number] " Load GotoDoc GotoDoc . Show End Sub Private Sub CmdPrintScreen_Click () Dim Msg On Error GoTo ErrorHandler Forml . PrintForm Printer . EndDoc Exit Sub ErrorHandler: Msq = "The form can't be printed." MsqBox Msq ' Display message. Resume Next End Sub Private Sub CmdRpts Click () Dim LoadAccess As Strinq, X As Variant Me. eft = (Screen. Width - Me. idth) / 2 Me. op = (screen. Height - Me. Height) / 2 Rem Load FrmRpt Rem FrmRpt . Show Rem ProqramPath.DataField = "DbPath" Rem MsqBox qs FileName$ Rem REMOVE THIS HARD CODE LoadAccess = "C:\PCHASER\msarn200.exe " & " C:\PCHAΞER\" & gs_FileName$ & " /ini pchaser . ini" X = Shell (LoadAccess, 1) End Sub Private Sub CmdTrans Click () Dim R As Double, Temp As Strinq Label3 .DataField = "ImaqePath" Temp = Label34.Caption & Text34.Text R = Shell ("SU CLONE.EXE " & Temp, 1) End Sub Private Sub Form LoadO Dim MyDb As Strinq, MyDrive As Strinq, Z As Inteqer Rem PLACED HERE BECUASE OF PATH PROBLEMS ON CDROM LOAD UP On Error Resume Next ' hourqlass cursor MouScPointer = 11 Me. Left = (Screen. idth Me. Width) / 2 Me. Top = (Screen. Heiqht Me. Height) / 2 qs FileName$ = Command$ Rem MsqBox Command$ Datal .DatabaseName = qs FileName$ Data2.DatabaseName = qs FileName$ Data3.DatabaseName qs FileName$ Datal . RecordSource = "Select * from [Document Info] order by [Doc Number]" Data2. RecordSource = "Select * from [Preferences] " Data3.RecordSource = "Select * from [Disk Names] " Textl. DataField = Doc Number" T Λ 2. ^ Field - Text3.DataField = "Beq Bates #" Text4.DataField = "End Bates #" Text5. DataField = "To" Text6.DataField = "From" Text7.DataField = "CC's" Textδ .DataField = "Description" Text9. DataField = "Comments" TextlO . DataField = "Taq 1" Textll.Dat^ield = "Taq 2" Textl2.DataField = "Taq 3" Textl3.DataField = "Taq 4" Textl4.DataField = "Taq 5" Textl5. DataField = "Taq 6" Textl6. DataField = "Taq 7" Text17. DataField = "Taq 8" Textl8. DataField = "Tag 9" Forml Textl9.DataField "Tag 10" Text20.DataField "Taq 11" Text21. DataField "Taq 12" Text22. DataField "Taq 13" Text23.DataField "Taq 14" Text24.DataField "Taq 15" Text25 DataField "Tag 16" Text26 DataField "Taq 17" Text27.DataField "Taq 18" Text28.DataField "Taq 19" Text29 DataField "Taq 20" Text30.DataField "Taq 21" Text31. DataField "Taq 22" Text32.DataField "Taq 23" Text33.DataField "Taq 24" Text3 .DataField "Entry Info" Text35 DataField "DbPath" Text35.DataField "Case Name" Text36. DataField "Exhibit #" Text37. DataField "Ext" LabellO. DataField = "Field 1" Labelll. DataField = "Field 2" Labell2.DataField = "Field 3" Labell3.DataField = "Field 4" Labell4.DataField = "Field 5" Labell5. DataField = "Field 6" Labellδ. DataField = "Field 7" Labell7.DataField = "Field 8" Labellδ .DataField = "Field 9" Labell9.DataField = "Field 10" Label20. DataField = "Field 11" Label21. DataField = "Field 12" Label22.DataField = "Field 13" Label23.DataField = "Field 14" Label24. DataField = "Field 15" Label25.DataField = "Field 16" Label26.DataField = "Field 17" Label27.DataField = "Field 18" Label28.DataField = "Field 19" Label29. DataField = "Field 20" Label3C DataField = "Field 21" Label31 DataField = "Field 22" Label32 DataField = "Field 23" Label33.DataField = "Field 24" Label3 .DataField = " ImagePath" ImaqeManl . AutoScale = 1 ImaqeManl . ScaleMethod = 3 Label35. DataField = "DbPath ' normal cursor MousePo ter = 0 ^-id S 'b Private Sub Form_Pamt ( ) Datal .Refresh End Sub Private Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer) End End Sub Private Sub Fulltext Click () Rem Remove hard coding for Isys Dim ISYS$, X& Rem X% Label34.DataField = "IsysPath" ISYS = Label34. Caption ISYS = "C.\ISYS\IQW.EXE /Z /D=" + ISYS Label34.DataField = "ImagePath" Forml - 4 X = Shell (ISYS, 3 ) End Sub Private Sub ImageManl DblClickO Rem remove hard coding for watermark Dim Temp As String, R As Double Label34.DataField = "ImagePath" Temp = Label34.Caption & Text34.Text R = Shell ("C:\WMPRO\WMPRO.EXE " & Temp, 3) End Sub Private Sub ImageManl GotFocusO Datal . Recordse . MoveNext : Datal . Recordset . MovePrevious End Sub Private Sub Textl DblClickO qs FieldName$ = " [Doc Number] " Load FrmSearch FrmSearch . Show End Sub Private Sub TextlO DblClickO qs FieldName$ = " [Tag i] " Load FrmSearch FrmSearch . Show End Sub Private Sub Textll DblClickO qs FieldName$ = " [Tag 2] " Load FrmSearch FrmSearch. Show End Sub Private Sub Textl2 DblClickO qs FieldName$ = " [Tag 3] " Load FrmSearch FrmSearch . Show End Sub Private Sub Textl3 DblClickO qs FieldName$ = " [Tag 4] " Load FrmSearch FrmSearch. Show End Sub Private Sub Textl4 DblClickO qs FieldName$ = " [Tag 5] " Load FrmSearch FrmSearch. Show End Sub Private Sub Textl5 DblClickO qs FieldName$ = " [Tag 6] " Load FrmSearch FrmSearch . Show End Sub Private Sub Textl6 DblClickO qs FieldName$ = " [Tag 7] " Load FrmSearch FrmSearch . Show End Sub ?rιv;t: Cub Tc::tI7 DblClickO qs FieldName$ = " [Tag 8] " Load FrmSearch FrmSearch . Show End Sub Private Sub Textlδ DblClickO qs FieldName$ = " [Tag 9] " Load FrmSearch FrmSearch . Show End Sub Private Sub Textl9 DblClickO qs FieldName$ = " [Tag 10] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text2 DblClick O gs_FιeldName$ = " [Doc Date] " Forml - 5 Load FrmSearch T *rriC!(2£s ;>- # ShθW End Sub Private Sub Text20 DblClickO qs FιeldName$ = " [Tag 11] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text21 DblClickO gs FιeldName$ = "[Tag 12]" Load FrmSearch FrmSearch . Show End Sub Private Sub Text22 DblClickO qs FιeldName$ = " [Tag 13] " Load FrmSearch FrmSearch . Show End Sub Private ≤ JD TextIS DblClickO qs FιeldName$ = " [Tag 14] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text24 DblClickO qs FιeldName$ = " [Tag 15] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text25 DblClickO qs FιeldName$ = " [Tag 16] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text26 DblClickO qs FιeldName$ = " [Tag 17] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text27 DblClickO qs FιeldName$ = " [Tag 18] " Lead FrmSearch FrmSearch . Show End Sub Private Sub Text28 DblClickO qs FιeldName$ = " [Tag 19] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text29 DblClickO qs FιeldName$ = " [Tag 20] " Load FrmSearch FrmSearch . Show ^nd Suh Private Sub Text3 DblClιcκ() qs FιeldName$ = " [Beg Bates #] Load FrmSearch FrmSearch . Show End Sub Private Sub Text30 DblClickO qs FιeldName$ = " [Tag 21] " Load FrmSearch FrmSearch Show End Sub Private Sub Text31 DblClickO qs FιeldName$ = " [Tag 22] " Load FrmSearch FrmSearch. Show End Sub Private Sub Text32 DblClickO Forml - 6 qs FieldName$ = "[Tag 23 J" Loaα FrmSearch FrmSearch. Show End Sub Private Sub Text33 DblClickO qs FieldNameS = "[Tag 24]" Load FrmSearch FrmSearcn . Show End Sub Private Sub Text34 Chanqe 0 Dim MyDb As Strmq, MyDrive As Strmq, Z As Inteqer, FileLoc As Strinq Dim Test As Strmq, BeqDocNum As Variant, EndDocNum As Variant, MyPath As String Dim DocToFind As Variant, CdPresent As String, MyName As Strinq Dim RemovePrefix As String, X As Dounle, Msg As String, OldPath As String, Inser tDlsk As Inteqer Label 36. Caption = "" Z = Len (Label35.Caption) - 4: MyDb = Lef (Label35. Caption, Z) MyDrive = Lef (MyDb, 3) On Error GoTo ErrorHandler LoadDriveType If el36. Caption = "File not Found. Check Disk" Ima Caption & Text34.Text If n l34. Caption & "Q.TIF" re file not available." If " Then : FileLoc = Left (Label35. Caption, X - 4) DAT" For Input As 1# refix RemovePrefix) : X = Len (DocToFind) - 5) : DocToFind = Val (MyName) Do While Not EOF(l) Input SI, DiskNum, BeqDocNum, EndDocNum If DccTcFmd >= BegDocNum And DocToFind ^ - EndDocNum Then Ξ Λ ιt Do Loop Close -1 If InsertDisk = 0 Then Me. Caption = "Paper Chaser - Disk #" &. DiskNum & " in CD ROM." Else Me. Caption = "Paper Chaser - Insert disk #" & DiskNum & " CD ROM." End If End If If DriveType = "Network Drive" Or DriveType = "Hard Drive" Then Me. Caption = "Paper Chaser - " & Label34. Caption & Text34.Text P-.H if Rem Me. Caption = "Paper Chaser - Document Info " & Label34. Caption & Text34.Te ErrorHandler : Select Case Err. Number Case 53 '"File Not Found" Label36.Caption = "File not found." ImaαeManl .Picture = MyDrive & "PChaserV ~ "Q.TIF" InsertDiΞ = 1 Resume Next Case 76 ' "No Disk" error. Label36.Caption = "No Disk CDROM. Insert a Disk." InsertDisk = 1 Resume Next Case 68 ' "Device not available" Forml - 7 Label36.Caption = "No Disk in CDROM. Insert a Disk." ImaqeManl . Pic ure - MyDrive & "FChaser\" & "Q.TIF" InsertDisk = 1 On Error Resume Next Case 32504 '"File Not Found" Label36.Caption = "File not found." ImaqeManl . Picture = MyDrive & "PChaser\" & "Q.TIF" InsertDisk = 1 Resume Next Case Else Rem On Error Resume Next MsqBox Err. Number & "Load Error Number" Resume Next End Select Resume End Sub Private Sub Text34 DblClickO qs FιeldName$ = " [Erαi / Info] ' Load FrmSearch FrmSearch . Show End Sub Private Sub Text36 DblClick O gs FieldName$ = " [Exhibit #] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text37 DblClick O qs FιeldName$ = " [Ext ] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text4 DblClickO qs FieldName$ = " [End Bates #] " Load FrmSearch FrmSearc . Show End Sub Private Sub Text5 DblClick O qs FιeldName$ = " [to] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text6 DblCl ick O qs FιeldName$ = " [ from] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text7 DblClickO qs FιeldName$ = "[CC's]" Load FrmSearch FrmSearch . Show End Sub Prιv^* ~ Sub Texts Db 1 Click 0 qs FιeldName$ = " [Description] " Load FrmSearch FrmSearch . Show End Sub Private Sub Text9 DblClickO qs FιeldName$ = " [Comments] " Load FrmSearch FrmSearcn . Show End Sub Function FileExists (Filename As String) As Boolean Dim TempAttr As Integer If ( Len ( Filename) = 0) Or ( InStr (Filename , "*") > 0) Or ( InStr (Filename , "?") > 0) Then FileExists = False Exit Function End If Forml - 8 n Error GoTo ErrorFileΞxist TempAttr = GetAttr (Filename) FileExists = ((TempAttr And vbDirectory) = 0) GoTo ExitFileExist ErrorFileExist : FileExists = False Resume ExitFileExist ExitFileExis : On Error GoTo 0 End Function Private Sub LoadDriveType ( ) Dim MyDrive As String On Error GoTo ErrorHandler ' get drive type of currently selected drive MyDrive = Left (Label34. Caption, 1) : Drivel. Drive = MyDrive Selec,. Case GetDriveType (UCase (Left (Drivel .Drive , 1)) & ":\") Case DRIVE REMOVABLE DriveType = "Floppy Drive" Case DRIVE FIXED DriveType = "Hard Drive" Case DRIVE REMOTE DriveType = "Network Drive" Case DRIVE CDROM DriveType = "CD-ROM Drive" Case DRIVE RAMDISK DriveType = "RAM Disk" Case 0 DriveType = "Could not determine drive type." Case 1 DriveType = "Drive does not exist." Case Else DriveType = "Unknown or Illegal Drive" End Select ' MsqBox DriveType Exit Sub ErrorHandler : Select Case Err. Number Case 68 'No Drive Found - Occurs when no CD ROM is in Drive Me. Caption = "Paper Chaser - No Disk in Drive." Case Else Rem MsgBox Err. Number & "Drive Type Error Number" End Select End Sub Private Sub Drivel Change ( ) 'load the drive type label when the drive combo ' changes LoadDriveType End Sub FrmRpt - 1 Option Explicit Private Sub BitRpt Click () Dim LoadAccess As String, X As Variant ProgramPath. DataField = "DbPath" LoadAccess = "msarr.200 . exe " & ProgramPath . Caption & " /mi pchaser . i " X = Shell (LoadAccess, 1) End Sub Private Sub CmdLoad Click () On Error Resume Next Dim Tempcase$, ReportFιleName$ Tempcase = UCase (Listl .Text) Select Case Tempcase Case UCase (Forml . LabellO . Caption) ReportFιleName$ = "RPT01.RPT" Case UCase (Forml . Laoelll . Caption) ReportFιleName$ = "RPT02.RPT" Case UCase (Forml . aPell2. Caption) ReportFιleName$ = "RPT03.RPT" Case UCase (Forml . Labell3. Caption) ReportFιleName$ = "RPT04.RPT" Case UCase (Forml . Labell4. Caption) ReportFileName$ = "RPT05.RPT" Case UCase (Forml . Labell5. Caption) ReportFιleName$ = "RPT06.RPT" Case UCase (Forml . Labell6. Caption) ReportFιleName$ = "RPT07.RPT" Case UCase (Forml .Labell7.Caption) ReportFιleName$ = "RPT08.RPT" Case UCase (Forml .Labellδ . Caption) ReportFιleName$ = "RPT09.RPT" Case UCase (Forml .Labell9.Caption) ReportFιleName$ = "RPT10.RPT" Case UCase (Forml .Label20.Caption) ReportFιleName$ = "RPT11.RPT" Case UCase (Forml .Label21.Caption) ReportFιleName$ = "RPT12.RPT" Case UCase (Forml . abel22. Caption) ReportFιleName$ = "RPT13.RPT" Case UCase (Forml . Label23. Caption) ReportFιleName$ = "RPT14.RPT" Case UCase (rcrrrl .Label24.Caption) ReportFιleName$ = "RPT15.RPT" Case UCase (Forml . Label25. Caption) ReportFιleName$ = "RPT16.RPT" Case UCase (Forml .Label26. Caption) ReportFιleName$ = "RPT17.RPT" Case UCase (Forml . abel27. Caption) ReportFιleName$ = "RPT18.RPT" Case UCase (Forml . Label28. Caption) ReportFιleName$ = "RPT19.RPT" Case UCase (Forml .Label29.Caption) ReportFιleName$ = "RPT20.RPT" p asp ,,π si5e ,'Fr,τ"τιi T ^b l3 . Capt. c r ReportFιleName$ = "RPT21.RPT" Case UCase (Forml .Label31. Caption) ReportFιleName$ = "RPT22.RPT" Case UCase (Forml . Label32. Caption) ReportFιleName$ = "RPT23.RPT" Case UCase (Forml .Label33.Caption) ReportFιleName$ = "RPT24.RPT" Case Else RenortFιleName$ = Listl.Text & ".rpt" End Select CrystalReportl .DataFiles (0) = App. Path & "\" & gs FιleName$ CrystalReportl . ReportFileName = App. Path & "\" & ReportF leName On Error GoTo ErrorHandler FrmRpt .Hide FrmRpt - 2 s String, ReportName As Strin le.. , 1) erS ' the followmq hunk of code should looks at the report name ' if it's on of the 24 standard reports, it uses the name ' ass qned it by the attorney, other wise it uses the name ' as it appears in the directory Select Case UCase (ReportName$) Case UCase ("RPT01") Listl .Addltem Forml .LabellO .Caption Case UCase ("RPT02") Listl .Addltem Forml . Labelll . Caption Case UCase ("RPT03") Listl .Addltem Forml . Labell2. Caption Case UCase ( "RPT04 " ) Listl .Addltem Forml . Labell3. Caption Case UCase ("RPT05") Listl .Addltem Forml . α-jell .Caption Case UCase ("RPT06") Listl .Addltem Forml . Labell5. Caption Case UCase ("RPT07") Listl .Addltem Forml .Labellβ .Caption Case UCase ("RPT08") Listl .Addltem Forml . Labell7. Caption Case UCase ("RPT09") Listl .Addltem Forml . Labellδ . Caption Case UCase ("RPT10") Listl .Addltem Forml . abell9. Caption Case UCase ("RPT11") Listl.Addltem Forml Labol20. Caption Case UCase ("RPT12") Listl .Addltem Forml . Label21. Caption Case UCase ("RPT13") Listl .Addltem Forml . Label22. Caption Case UCase ("RPT14") Listl .Addltem Forml . Label23. Caption Case UCase ("RPT15") Listl .Addltem Forml . Label24. Caption Case UCase("RPT16' Listl .Addltem Forml . Label25. Caption Case UCase ("RPT17") Listl .Addltem Forml .Label26.Caption Case UCase ("RPT18") Listl.Addltem Forml . abel27.Caption Case UCase ("RPT19") Listl .Addltem Forml .Label28.Caption FrmRpt Case UCase ("RPT20") Listl.Addltem Forrr.I .Label29 Caption Case UCase ("RPT21") Listl.Addltem Forml . Label30 Caption Case UCase ("RPT22") Listl .Addltem Forml . Label31 Caption Case UCase ("RPT23") Listl.Addltem Form.l . Label32 Caption Case UCase ("RPT24") Listl.Addltem Forml . Label33 Caption Case Else Listl. ddltem ReportName$ End Select ReportName$ = " " ' eset reportName$ to nothing Next I End Sub Private Sub Form Load On Error GoTo ErrorHandler Me.Left = (Screen. idth - Me.Width) / 2: Me. op = (Screen. Height Me. Height) / 2 Datal. DatabaseName = App. Path & "\" & gs_FileName$ ProqramPath.DataField = "DbPath" Datal .RecordSource = "Select * from [Preferences] " Call GetReportNames Exit Sub ErrorHandler: Select Case Err. umber Case 0 Resume Next Case Else Rem On Error Resume Next MsqBox Err. umber & "Load Error Number" Resume Next End Select End Sub Private Sub Listl DblClickO CmdLoad.Value = True End Sub FrmSearch - 1 Option Explicit Frivate Sub CmdCancel_Click () Unload FrmSearch End Sub Private Sub CmdFirst Click () Dim MyCriteria As String Forml .Datal . Recordset .MoveFirst Forml . Data2. Recordset .MoveFirst MyCriteria = gs FieldName$ & " like " & ••'* » & txtSearch.Text & "*'" Forml .Datal .Recordset . FindFirst MyCriteria If Forml. Datal. Recordset .NoMatch Then MsgBox "Term not found in search. " End If End Sub Private Sub CmdNext Click () Dim MyCriteria As Strinq MyCritena = gs FieldName$ & " like " & "'* » & txtSearch. Text & "*'" Forml . Datal . Recordset . FindNext MyCriteria If Forml. Datal. Recordset .NoMatch Then MsqBox "Term not found in search. " End If End Sub Private Sub Form Load Me. eft = (Screen.Width - Me.Width) / 2 Me. Top = (Screen.Height - Me.Height) / 2 End Sub GotoDoc - 1 Option Explicit Private Sub CmdCancel_Click ( ) Unload GotoDoc End Sub Private Sub CmdFirst Click () Dim MyCriteria As Strinq Rem Forml . Datal . Recordset . MoveFirst MyCriteria = qs FieldName$ & " like " & "'*" & txtSearch.Text & "*'" Forml . Datal . Recordset . FindFirst MyCriteria If Forml. Datal. Recordset .NoMatch Then MsqBox "Term not found in search. " End If End Sub Private Sub Form Load Me. eft = (Screen. Width - Me. Width) / 2 Me. Top = (Screen. Height - Me. Height) / 2 End Sub Modulel - 1 Public gs FieldName$ Public gs FilεNaτne$ Publ'ic CurrentDisk As Variant Public DiskNum As Variant Public MyCriteria As String frmlmageViewer - 1 'Document Image Viewer - Doc I.v. 'Copyriqht (c) 1996, Tempest Software Inc. Option Explicit Deflnt A-Z Private Declare Function WritePrivateProfileStrinq Lib "Kernel" (ByVal IpApplica tionName As String, IpKeyName As Any, IpString As Any, ByVal IplFileName As Stri nq) As Inteqer Dim sl qFileName As Strinq Dim iNumOfPaqes As Inteqer Dim iCurrentPaqe As Inteqer Dim iQualityFactor As Integer 'General Constants Const SCROLL BAR = 250 Const PROGRAM NAME = "Doc I.V." 'VisualBasic Constants Const OFN HIDEREADONLY = &H4& Const PD PRINTΞETUP = &H40& 'TK3 Constants Const VX FULLIMAGE = 0 Const VX ZOOMIN = 1 Const VX ZOOMRECT = 3 Const VX STARTPRINT = 5 Const VX PRINT = 6 Const VX ENDPRINT = 7 Const VX MARKHOLLOW = 2 Const VX MAGNIFIER = 3 Const VX NONE = 0 Const VX HORIZONTAL = 1 Const VX VERTICAL = 2 Const VX BOTH = 3 Const VX BESTFIT = 1 Const VX FULLWIDTH = 2 Const VX FULLHEIGHT = 3 'TMS Error Constants Const ERR BADFILENAME = 20000 Const ERR BADPROPVALUE = 20001 Const ERR NOIMAGE = 20002 Const ERR NOPRINTER = 20003 Const ERR GETPALETTE = 20004 Const ERR INTERRCR = 20005 Const ERR BADDC = 20006 Const ERR BAD WINDOW = 20500 Const ERR CLIPBOARD ERROR = 20501 Const ERR BITMAP ERROR = 20502 Const ERR NO PRINTER = 20503 Const ERR NO GRAPHICS = 20504 Const ERR PRINT ABORTED = 20505 Const ERR BAD PAGENUM = 20506 Const ERR PRINT BUSY = 20507 Const ERR BAD PERCENT = 20508 Const ERR NO RECT = 20509 Con?*" τ *.?P. CAN? ZOOM ■ = ^ 51 Const ERR CANT SCROLL = ' 20511 Const ERR NO MEMORY = 20512 Const ERR_BAD_P RM = 20513 Private Sub exitProqramO Call preferencesSave Unload frmlmageViewer End Sub Private Sub fileOpenO On Error Resume Next frmlmaqeViewer.vdVBX.Visible = False frmlmaqeViewer.vdVBX. filename = sImgFileName$ iNumOfPaqes% = vdVBX.Paqes iCurrentPaqe% = vdVBX.Page + 1 HScrolll.Value = 0 frmlmageViewer - 2 Select Case iNumOfPages% Case 0 HScrolll.Visible = False MsgBox "The specified file name is" & Chr(lO) & "either not a valid file n ame," & Chr(lO) & "or is not in an accepted image format.", 0, "Error loading fi le. " frmlmageViewer. Caption = PROGRAM_NAME Exit Sub Case 1 HScrolll.Visible = False frmlmageViewer .Caption = frmlmageViewer .CMDialogl . FileTitle Case Else HScrolll.Visible = True frmlmageViewer. Caption = frmlmageViewer . CMDialogl . FileTitle & " Page " & iCurrentPage% & " of " & iNumOfPages% End Select Call menuEnabled Call imageRefresh End Sub Private Sub Form Load() Call preferencesLoad Call menuDisabled frmlmageViewer. Caption = PROGRAM NAME frmlmageViewer.vdVBX. Visible = False frmlmageViewer. vdVBX.MagnifyRatio = 2 frmlmageViewer. vdVBX. ZoomRatio = 50 vdVBX.RightMouseStyle = VX MAGNIFIER vdVBX. LeftMouseStyle = VX_MARKHOLLOW HScrolll. Visible = False If gFileName$ <> "" Then sImqFileName$ = gFileName$ Call fileOpen End If End Sub Private Sub Form Resize 0 On Error Resume Next frmlmageViewer.vdVBX.Visible = False vdVBX. Width = frmlmageViewer .ScaleWidth vdVEX. Height = frmlmageViewer . ScaleHeigh - vdVBX.Top HScrolll. Left = 20 HScrolll. Top = frmlmageViewer . ScaleHeight - HScrolll .Height - 217 Call imageRefresh End Sub Private Sub Form Unload (Cancel As Integer) Call exitProgram End Sub Private Sub HScrolll Change () On Error Resume Next HScrolll M?. = iNumOfPagcc 1 HScroϊlϊ.Min = 0 frmlmageViewer .vdVBX.Visible = False frmlmageViewer .vdVBX. Page = HScrolll .Value iCurrentPaqe = HScrolll .Value + 1 frmlmaqeViewer. Caption = frmlmageViewer. CMDialogl . FileTitle & " Page " & iC urrentPage% & " of " & iNumOfPages% Call imageRefresh End Sub Private Sub imageRefresh 0 On Error Resume Next If mnuPreferencesFitHeight .Checked = True Then frmlmageViewer.vdVBX.ImageScaleHeiqht = vdVBX. Height - SCROLL_BAR Elself mnuPreferencesFitWidth. Checked = True Then frmlmageViewer.vdVBX. ImageScaleWidth = vdVBX. idth - SCROLL BAR End If _ frmlmageViewer - 3 frmlmaqeViewer.vdVBX. ImaqeScaleLeft = 0 frmlmageViewer .vdVEX. ImagcScalcTcp - 0 frmlmaqeViewer.vdVBX.Visible = True Call menuPageCheck frmlmageViewer .vdVBX . SetFocus End Sub Private Sub menuDisabled ( ) Private Sub menuEnabled mnuFilePrint .Enabled = True mnuPaqeNext .Enabled = True mnuPagePrevious. Enabled = True mnuPageFirst .Enabled = True mnuPageLast .Enabled = True mnuPageGoto . Enabled = True mnuZoomZoomln. Enabled = True mnuZoomZoomOut .Enabled = True mnuEffectsRotateC. Enabled = True mnuE fectsRotateCC. Enabled = True mnuEffectsRotatelmaqeFlip. Enabled = True mnuEffectsRotateReset .Enabled = True mnuEffactsMirrcrll. Enabled - True mnuEffectsMirrorV. Enabled = True mnuEffectsMirrorBoth. Enabled = True mnuEffectsMirrorReset .Enabled = True mnuPreferencesInvertColors .Enabled = True End Sub Private Sub menuPageCheck ( ) If vdVBX.Paqes = 0 Then Exit Sub ' check for page numbers if only one page disable all pageroutines If vdVBX.Paqes = 1 Then mnuPageNext .Enabled = False ni n i . i P a . n sPr v?. PUS . Enabled — F lee mnuPageFirst .Enabled = False mnuPageLast .Enabled = False mnuPaqeGoto. Enabled = False Exit Sub End If ' check for 1st page If HScrolll. Value = 0 Then mnuPaqePrevious .Enabled = False mnuPageFirst .Enabled = False mnuPageNext .Enabled = True mnuPageLast .Enabled = True Elself HScrolll. Value = (iNumOfPages - 1) Then mnuPagePrevious .Enabled = True mnuPageFirst .Enabled = True mnuPageNext .Enabled = False mnuPageLast .Enabled = False frmlmageViewer - 4 Else mnuPagePrevious. Enabled = True mnuPageFirst .Enabled = True mnuPageNext .Enabled = True mnuPageLast .Enabled = True End If End Sub Private Sub mnuEffectsMirrorBoth Click 0 Select Case frmlmageViewer .vdVBX. Mirror Case VX NONE frmlmageViewer .vdVBX . Mirror VX BOTH Case VX BOTH frmlmageViewer .vdVB . Mirror VX NONE Case VX VERTICAL frmlmageViewer . vdVBX . Mirror VX_HORIZONTAL Case VX HORIZONTAL frmlmageViewer. vdVBX. Mirror VX_VERTICAL End Select imageRefresh End Sub Private Sub mnuEffectsMirrorH Clic () Select Case frmlmageViewer.vdVBX.Mirror Case VX NONE frmlmaqeViewer.vdVBX. Mirror = VX HORIZONTAL Case VX HORIZONTAL frmlmaqeViewer.vdVBX. Mirror = VX NONE Case VX BOTH frmlmaqeViewer.vdVBX. Mirror = VX VERTICAL Case VX VERTICAL frmlmaqeViewer.vdVBX. Mirror = VX_BOTH End Select imageRefresh End Sub Private Sub mnuEffectsMirrorReset Clic () frmlmageViewer. vdVBX. Mirror = VX_NONE imageRefresh End Sub Private Sub mnuHffectsMirrorV Click () Select Case frmlmageViewer .vdVBX. Mirror Case VX NONE frmlmaqeViewer.vdVBX. Mirror = VX VERTICAL Case VX VERTICAL frmlmageViewer. vdVBX. Mirror = VX NONE Case VX BOTH frmlmageViewer. vdVBX. Mirror = VX HORIZONTAL Case VX HORIZONTAL frmlmaqeViewer.vdVBX. Mirror = VX_BOTH End Select End Sub Private Sub mnuEffectsRotateC Click () Select Case frmlmageViewer ' .vdVBX. Rotation Case 0 frmlmageViewer. vdVBX. Rotation = 90 Case 90 frmlmageViewer.vdVBX. Rotation = 180 Case 180 frmlmageViewer. vdVBX. Rotation = 270 Case 270 frmlmageViewer .vdVBX. Rotation = 0 End Select imaqeRefresh End Sub frmlmageViewer - 5 Private Sub mnuEffectsRotateCC Click () " ' " " " Select Case frmlmageViewer .vdVBX. Rotation Case 0 frmlmageViewer.vdVBX. Rotation = 270 Case 90 frmlmageViewer .vdVBX. Rotation = 0 Case 180 frmlmageViewer.vdVBX. Rotation = 90 Case 270 frmlmageViewer .vdVBX. Rotation = 180 End Select imageRefresh End Sub Private Sub mnuEffectsRotatelmaqeFlip Click 0 Select Case frmlmageViewer .vdVBX. Rotation Case 0 frmlmageViewer. vdVBX. Rotation = 180 Case 90 frmlmageViewer. vdVBX. Rotation = 270 Case 180 frmlmageViewer.vdVBX. Rotation = 0 Case 270 frmlmageViewer.vdVBX. Rotation = 90 End Select imageRefresh End Sub Private Sub mnuEffectsRotateReset Clic () frmlmaqeViewer.vdVBX. Rotation = 0 imageRefresh End Sub Private Sub mnuFileExit_Click () Call exitProgram End Sub Private Sub mnuFileOpen Click () On Error GoTo loadError frmlmaqeViewer.vdVBX.Visible = False f mlmageViewer .HScrolll .Visible = False frmlmaqeViewer. Caption = PROGRAM NAME frmlmaqeViewer.CMDialoql .CancelError = True frmlmageViewer. CMDialogl .DialogTitle = "Open Imaqe File" frmlmaqeViewer. CMDialogl. Flags = OFN HIDEREADONLY frmlmageViewer. CMDialogl. Filter = "All Images (* . *) | * .bmp; * . ipq; * .pcx; * . tif ; JPEG files (*.jpg)| *.jpq|PCX files (*.pcx) | " *.pcx JTIFF files (* ' .tif) | *.tif Windows Bitmap (*.bmp) |*.bmp " frmlmaqeViewer. CMDialoql .Filterlndex = 1 frmlmaqeViewer. CMDialoql .Action = 1 sImqFileName$ = frmlmageViewer . CMDialogl . filename frmlmageViewer .vdVBX. Quality = iQualityFactor% Exit Sub loadError: frmlmageViewer .Caption = PROGRAM_NAME Exit Sub End Sub Private Sub mnuFilePrint Click () vdVBX.PrintStyle = VX FULLIMAGE vdVBX. ction = VX STARTPRINT vdVBX.Action = VX PRINT vdVBX.Action = VX_ENDPRINT End Sub Private Sub mnuFilePrintSetup__Click 0 Dim CancelFlag As Integer " CancelFlag = True frmlmageViewer - 6 On Error Resume Next CMDialogl. CancelError = l_. c CMDialogl. Flags = PD_PRINTSΞTUP CMDialogl .Action = 5 If (Err = 0) Then CancelFlag = False End If If (CancelFlag = True) Then Exit Sub End Sub Private Sub mnuHelpAbout_Clιck 0 Load frmAbout frmAbout . Show 1 frmlmageViewer . Show End Sub Private Sub mnuPageFιrst_CLιcκ 0 HScrolll.Value = 0 End Sun Private Sub mnuPageGoto_Clιct ( ) Load frmGotoPage frmGotoPage . Show 1 End Sub Private Sub mnuPaqeLast Clιc:0 HScrolll. Value = vdVBX. Pages - 1 End Sub Private Sub mnuPageNext Click 0 HScrolll Value = HScrolll .Value -r 1 End Sub Private Sub mnuPagePrevious Click 0 HScrolll.Value = HScrolll .Value - 1 End Sub Private Sub mnuPre erencesFitHeiαnt Click 0 mnuPrefεrencesFitHeignt .Checked = True mnuPreferencesFitWidth. Cr.ecκeα = False Call imageRefresh End Sub Private Sub mnuPreferencesFitWidth Click 0 mnuPreferencesF tHeignt . Checked = False mnuPreferencesFitWidth. ChecKed = True Call imageRefresh End Sub Private Sub mnuPreferencesImageQualιtyHιgh_Clιck Private Sub mnuPref erencesImageQualιtyLow_Clιck 0 ιQualιtyFactor% = 0 mnuPref erencesImageQualityLow . Checked = _True mnuPref erencεsImageQualityMedium. Checked = False mnuPreferencesImageQua lityHi h . Checκed = False vdVBX . Quality = ιQualιtyFactor% End Sub Private Sub mnuPreferencesImageQuaiιtyMedιum_Clιck ( ) ιQualιtyFactor% = 5 mnuPreferencesImageQuali t yLow. Checked = False mnuPreferencesImageQuali t yMedium.ChecKed = True frmlmageViewer - 7 mnuPreferencesImageQuaiityHigh. Checked = False vdVΞX. uality - Qualιtv?actor% End Sub Private Sub mnuPreferencesInvertColors Click 0 If frmlmaqeViewer.vdVBX. Invert = True Then frmlmaqeViewer.vdVBX. Invert = False frmlmageViewer .mnuPreferencesInvertColors .ChecKed = False Else frmlrrageViewer . vdVBX. Invert = True frmlmageViewer. mnuPreferencesInvertColors. ChecKeα = True End If End Sub Private Sub mnuZoomZoomIn_Clιck ( ) Call zoomln End Sub r_-.va.te S_.. mnuZoomZoomOut_ _ick () Call zoomOut End Sun Private Sub preferencesLcad ( ) frmlmageViewer . Left = qFormLeftS: rmlmaqeViewer . Top = αFormTopk frmlmaαeViewer .Width = αFormWidtnk frmlmaqeViewer . Height = αFormHeigntk If InStr (gFιtWιdth$, "TRUE") Then mnuPreferencesFitHeiσnt . Checked = False mnuPreferencesFitWidth. Cneckeα = True Else mnuPreferencesFitHeignt . Checked = True mnuPreferencesFitWidth. Checked = False End If Select Case gQualιtyFactor% Case 0 mnuPreferencesImageQualityLow. Checked = True mnuPreferencesImageQuaii t yMeαium. Checked = False mnuPreferencesImageQualityHign. ChecKed = False ιQualιtyFactor% = 0 mnuPreferencesImageQualityLow. Checked = raise mnuPreferencesImageQualityMedium. ChecKed = True mnuPreferencesImaαeQuaiityHign. Checked = False ιQuantyFactor% = 5 Case 10 mnuPreferencesImaqeQualityLow Checked = False mnuPreferencesImaσeQualityMedium. Checked = False mnuPreferencesImaqeQuaiityHign.ChecK.ed = True ιQuantyFactor% = 10 End Select End Sub Private Sub preferencesSave () ' On Error Resume Next Dim ιRet% Dim sSectιon$ Dim sEntry$ Dim sValue$ Dim sFιleName$ If Riqh (App. Path, 1) = "\" Then = ; FιleName$ = App. Path ^ "dociv. lr. 1 " Else sFileName$ = App. Path & "\" & "dociv.mi" End If sSectionS = "Form Position" sEntry$ = "Form Width" sValue$ = Str (frmlmaqeViewer .Width) iRet = WritePrivateProfileStrmg (ByVal sSection, ByVal sEntry, ByVal sValue, frmlmageViewer - 8 ByVal sFileName) sΞntry$ = "Form Height" sValue? = Str (frmlmageViewer .Heiqht) iRet = WritePrivateProfileString (ByVal sSection, PyVal sEntry, ByVal sValue, ByVal sFileName) sEntry$ = "Form Left" sValue? = Str (frmlmageViewer . Left ) ττ iRet = WritePrivateProfileString (ByVal sSection, _.yVal sentry, 3yVal sValue, ByVal sFileName) sEntry$ = "Form Top" sValueS = Str (frmlmageViewer . op) . _ _ „ , ,, , iRet = WritePrivateProfileStrmg (ByVal sSection, ^yVal s_.n_ry, nyVal sValue, ByVal sFileName) sSec_ion$ = "Preferences" sEntry$ = "Fit Width" If mnuPreferencesFitWidth. Checked = True Then sValue$ = "TRUE" _-__LSΘ sValue$ = "FALSE" End If _ ιRet * = WritePrivateProfileStrmg (ByVal sSection, ByVal sEntry, ByVal sValue, ByVal sFileName) sEntry$ = "Image Quality" sValue$ = Str (iQualityFactor%) ,, . ,, , iRet = WritePrivateProfileString (ByVal sSection, ByVal sEntry, =yVai sVaiue, 3yVal sFileName) End Sub Private Sub vdVBX Status (Index As Integer, Status As Integer, Value As Long) On Error Resume Next If frmlmaqeViewer.vdVBX. Marked = True Then frmlmageViewer. vdVBX.Action = VX_ZOOMRΞCT End If End Sub Private Sub zoomln 0 On Error Resume Next frmlmaαeViewer . vdVBX. ZoomRatio = 50 frmlmageViewer. vdVBX.Action = VX_ZOOMIN End Sub Private Sub zoomOut 0 On Error Resume Next frmlmaαeViewer .vdVBX . ZoomRatio = 50 frmlmaαeViewer. vdVBX.Action = 2 'VX_ZOOMOUT End Sub frmlntro - I Option Explicit DefInt A- Z Private Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicati onName As String, IpKeyName As Any, ByVal IpDefault As Strir.c, ByVal lpReturnedS tπng As String, ByVal nSize As Integer, ΞyVal IpFileName As String) As Integer Private Sub displayText () FontSize = 100 frmlntro. CurrεntX = 22: frmlntro. CurrentY = 52 ForeColor = QBColor(8) Print "Doc I .V. " frmlntro. CurrentX = 20: mlntro. CurrentY = 50 ForeColor = QBColor(15) Print "Doc I .V. " frmlntro. CurrentX = 21: f mlntro. CurrentY = 51 ForeColor = QBCoIor(7) Print "Doc I .V. " ' * * * * ***** * * * * * *** ** * ** **** * ** FontSize = 18 frmlntro. CurrentX = 72: rmlntro. CurrentY = 202 ForeColor = QBCoior(8) Print "The Multiple Format Image Viewer" frmlntro. CurrentX = 70: mlntro. CurrentY = 200 ForeColor = QBColor(15) Print "The Multiple Format Image Viewer" frmlntro. CurrentX = 71: f mlntro. CurrentY = 201 ForeColcr = QBCoIor(7) Print "The Multiple Format Image Viewer" ' * * **** *** *** * ** * * * ** * ** ** ****"' frmlntro. CurrentX = 17: frmlntro. CurrentY = 302 ForeColor = QBColor(8) Print "Doc IV, Copyright (c) 1996, Temoest Software" frmlntro. CurrentX = 15: frmlntro . CurrentY = 300 ForeColor = QBColor(lS) Print "Doc IV, Copyright (c) 1996, Tempest Software" frmlntro. CurrentX = 16: f mlntro. CurrentY = 301 ForeColor = QBColcr(7) Print "Doc IV, Coovriαht (c) 1996, Tempest Software" End Sub Private Sub exitΞplashScreen () frmlmageViewer. Show frmlntro .Hide Unload frmlntro End Sub Private Sub Form Click 0 exitSolashScreen End Sub Private Sub Form KeyPress (KeyAscii As Integer) exitSplashScreen En =".b Private Sub Form Load 0 On Error Resume Next frmlntro. Left = (Screen. Width - frmlntro .Width) / 2 frmlntro. Top = (Screen. Height - frmlntro . Heigh ) / 2 Call preferencesCheck qFileNameS = Commands Load frmlmaαeViewer If qFileNameS <> "" Then Load frmlmaqeViewer Call exitSplashScreen End If End Sub Private Sub Form Paint 0 Call displayText frmlntro - 2 End Sub Private Sub nreferencesCheck ( ) Dim sFileName? Dim sSection? Dim sKevNameS Dim sDefaultS Dim sReturn$ Dim ιRεt rnSιzε% Dim ιReturn% If Riqnt (App. Path, 1) = "\" Then sFileNameS = App. Path & "dociv.mi" Else sFιlεNamε$ = App. Path & "\" & "dociv.mi" End If sSecticnS = "Form Position" sReturnS = Space$(10) ιReturnSιzε% = 10 ByVal sKeyNameS, sDefau t ByVal sKeyNameS, sDerauxt ByVal sKeyNameS, sDefauit , ByVal sKeyNameS, sDefau_t ByVal sKeyNameS, sDefauit ByVal sKeyNameS, sDefauit , ByVai sKeyNameS, sDefaui Private Sub Timerl Timer 0 exitSplashScreen End Sub rrmGotoPage Option Explicit Deflnt A-Z Dim iPageNumper As Integer Private Sub cmdOK Click 0 If lPageNumner > 0 Then frmlmaqeViewer .HScrolll .Value = lPageNumpe: End If frmGotoPaqe . Hide Unload frmGotoPage End Sub frmGotoPage .Width) / 2 frmGotoPage. Heignt) / 2 " S frmlmageViewer .vdVBX. Pages & pages Private Sub - tGotoPaαe Change 0 ' this must only be a numoer and ; ;t be > 0 S < total numoer of pages On Error Resume Next lPageNumner = txtGotoPage . Text End Sub frmAbout - 1 Option Explicit Deflnt A-Z Private SUP cmdOK_Clιck ( ) frmAbout . Hide Unload frmAbout End Sub Private Sub Form Load () frmAbout Left = ( Screen. Widtn frmAbout .Width) / 2 frmAbc- . op = (Screεn Heignt frmApou .Heign ) / 2 End Sub GLOBALS - 1 Option Explicit Global αFormWidthk Global αFormHeιgnt& Global αFormLeftk Global αFormTopk Global gFitVJidtnS Glopal σQualιtyFactor% Global qFileNameS 'Global gStartUoScreen$ X \PCHASER\NATIONAL MDB Tuesday, October 21, 1997 Text Align General Top 3120 Visible Yes Width 1149 Code 1 Option Compare Database 'Use database order for string comparisons 2 3 Sub Button23_Clιck () 4 On Error GoTo Err_Button23_Clιck 5 6 Dim DocName As String 7 Dim LinkCriteπa As String 8 9 DocName = "Forml" 10 DoCmd OpenForm DocName, , , LinkCnteria 11 12 Exιt_Button23_Clιc : 14 15 Err_Button23_Clιc • 16 MsgBox Error$ 17 Resume Exιt_Button23_Clιck 18 19 End Sub 20 21 Sub Exhιbιts_Clιck () 22 On Error GoTo Err_Exhιbιts_Clιck 23 24 Dim DocName As String 25 Dim LinkCnteria As String 26 27 DocName = "Exhibit List" 28 DoCmd OpenForm DocName, , LinkCnteria 29 30 Exιt_Exhιbιts_Clιc : 32 33 Err_Exhιbιts_Clιck . 31 MsgBox Error$ 35 Resume Exιt_Exhιbιts_Clιck 36 37 End Sub 38 39 Sub Form_GotFocus () 40 DoCmd Maximize 41 End Sub 42 43 Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Single) 44 Me width = screen. idth X \PCHASER\NATIONAL MDB Tuesday, October 2 , 1997 Form Mam Page' 39 45 Me . height = screen . height 46 Me . left = (screen . idth - Me . idth) - 2 47 Me . Top = (screen. height - Me . height) - 2 48 End Sub 49 50 Sub Foπn_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single) 51 Me. width = screen. idth 52 Me.height = screen.height 53 Me. left = 0 54 Me. Top = 0 55 End Sub 56 57 Sub Form_Open (Cancel As Integer) 58 ahtAccessSystemltems False, True, True 59 End Sub 60 61 Sub Report_Menu_Clιck () 62 On Error GoTo Err_Report_Menu_Clιck 63 64 Dim DocName As String 65 Dim LinkCnteria As String 66 67 DocName = "Print Menu" 68 DoCmd OpenForm DocName , , , LinkCnteria 69 70 Exιt_Report_Menu_Clιck: 72 73 Err_Report_Me*nι_C3 τ.r: : 74 MsgBox Error$ 75 Resume Exιt_Report_Menu_Clιck 76 77 End Sub 78 79 Sub Reports_Menu_Clιck () 80 On Error GoTo Err_Reports_Menu_Clιck 81 82 Dim DocName As String 83 Dim LinkCnteria As String 84 85 DocName = "Print Menu" 86 DoCmd OpenForm DocName, , , LinkCnteria 87 88 Exιt_Reports_Menu_Clιck: 90 91 Err_Reports_Mfinu_Clιck ■ 92 MsgBox Error$ 93 Resume Exιt_Reports_Menu_Clιck 94 95 End Sub X \PCHASER\NATIONAL MDB Tuesday, October 21 , 1997 96 97 Sub Text_Search_Clιck () 98 Dim ISYS$, X% 99 ISYS = DLooku C'IsysPath" , "Preferences") 100 ISYS = "C:\ISYS\IQW.EXE /Z /D=" + ISYS 101 X = Shell (ISYS, 1) 102 End Sub 103 104 Sub Transcrιpt_Clιck () 105 On Error GoTo Err_Transcπpt_Clιck 106 107 Dim X As Integer 108 Dim AppName As String 109 110 AppName = "C:\ACCESS\SUMCLONE.EXE" 111 X = Shell (AppName , 1) 112 113 Exιt_Transcrιpt_Clιck: 115 116 Err_Transcπpt_Clιck : 117 MsgBox Error$ 118 Resume Exιt_Transcrιpt_Clιck 119 120 End Sub 121 122 Sub Transcrιpt_Search_Clιck () 123 On Error GoTo Err_Transcrιpt_Search_Clιck 124 125 Dim X As Integer 126 Dim AppName As String 127 128 AppName = "SUMCLONE.EXE" 129 X = Shell (AppName , 1) 130 131 Exιt_Transcπpt_Search_Clιck: 133 134 Err_Transcrιpt_Sβarch_Clιck : l-ib MsgBox Error$ 136 Resume Exιt_Transcrιpt_Search_Clιck 137 138 End Sub 139 140 Sub Transcπpts_Clιck () 141 On Error GoTo Err_Transcrιpts_Clιck 142 143 Dim X As Integer 144 Dim AppName As string 145 146 AppName = "SUMCLONE.EXE" X:\PCHASER\NATIONAL.MDB Tuesday, October 21 , 1997 Form: Main Page: 41 147 X = Shell (AppName , 1) 148 149 Exit_Transcripts_Click: 150 Exit Sub 151 152 Err_Transcripts_Click: 153 MsgBox Error$ 154 Resume Exit_Transcripts_Click 155 156 End Sub 157 X:\PCHASER\NATIONAL.MDB Tuesday, October 21, 1997 Form: Preferences Page: 47 Scroll Bars: None Section: 0 Special Effect: Sunken Tab Index: 4 Tab Stop: Yes Text Align: General Top: 1560 Visible: Yes Width: 3600 Code 1 Option Compare Database 'Use database order for string comparisons 2 3 Sub Return_to_System_Men_Clιck () 4 On Error GoTo Err_Return_to_System_Men_Click 5 6 7 DoCmd Close 8 9 Exιt_Return_to_System_Men Click: 11 12 Err_Return_to_System_Men_Click : 13 MsgBox Error$ 14 Resume Exιt_Return_to_System_Men_Clιck 15 16 End Sub 17 X:\PCHASER\NATIONAL.MDB Tuesday, October 21 , 1997 Form: Print Menu Page: 73 28 Exιt_Comments_Clιck : 30 31 Err_Comments_Clιck: 32 MsgBox Error$ 33 Resume Exιt_Comments_Click 34 35 End Sub 36 37 Sub Date_Range Click () 38 On Error GoTo Err_Date_Range_Clιck 39 40 D m DocName As String 41 42 DocName = "Date Range" 43 DoCmd OpenReport DocName, A_PREVIEW 44 45 Exιt_Date_Range_Clιck : 47 48 Err_Date_Range_Click: 49 MsgBox Error$ 50 Resume Exιt_Date_Range_Clιck 51 52 End Sub 53 54 Sub Descrιptιon_Clιck () 55 On Error GoTo Err_Descπptιon_Clιck "56 57 Dim DocName As String 58 59 DocName = "Search Term in Description" 60 DoCmd OpenReport DocName, A_PREVIEW 61 62 Exιt_Descrιptιon_Clιck : 64 65 Err_Descrιptιon_Clιck: 66 MsgBox Error$ 67 Resume Exιt_Descrιptιon_Clιck 68 69 End Sub 70 71 Sub Doc Fιnd_Clιck () 72 On Error GoTo Err_Doc Fιnd_Clιck 73 74 Dim DocName As String 75 76 DocName = "Document # Find" 77 DoCmd OpenReport DocName, A_PREVIEW 78 X:\PCHASER\NATIONAL.MDB Tuesday, October 21, 1997 Form: Print Menu Page: 74 79 Exιt_Doc Fιnd_Clιck : 80 Exit Sub 81 82 Err_Doc Fιnd_Clιck : 83 MsgBox Error$ 84 Resume Exit Doc Find Click 85 86 End Sub 87 88 Sub Names_Clιck () 89 On Error GoTo Err_Names_Clιck 90 91 Dim DocName As String 92 93 DocName = "Names " 94 DoCmd OpenReport DocName, A_PREVIEW 95 96 Exιt_Names_Clιc : 97 Exit Sub 98 99 Err_Names_Clιck: 100 MsgBox Error$ 101 Resume Exιt_Names_Clιck 102 103 End Sub 104 105 Sub Seach_From_Clιck () 106 On Error GoTo Err Seach_From_Clιck 107 108 Dim DocName As String 109 110 DocName = "Search From" 111 DoCmd OpenReport DocName , A_PREVIEW 112 113 Exιt_Seach_From_Clιck : 115 116 Err_Seach_From_Clιck : 117 MsgBox Error$ ilϊ Resume Ex t_Seach_From_Clιck 119 120 End Sub 121 122 Sub Search_CCs_Clιck () 123 On Error GoTo Err_Search_CCs_Clιck 124 125 D m DocName As String 126 127 DocName = "Search CCs" 128 DoCmd OpenReport DocName , A_PREVIEW 129 X:\PCHASER\NATIONAL.MDB Tuesday, October 21 , 1997 Form: Print Menu Page: 76 181 Exit Tag_l Click: 183 184 Err Tag 1 Click : 185 MsgBox Error$ 186 Resume Exιt_Tag 1 Click 187 188 End Sub 189 190 Sub Tag 10 Click () 191 On Error GoTo Err_Tag_10_Clιck 192 193 Dim DocName As String 194 195 DocName = "ListlO" 196 DoCmd OpenReport DocName , A PREVIEW 197 198 Exιt_Tag_10_Clιck : 200 201 Err_Tag_10_Clιc : 202 MsgBox Error$ 203 Resume Exιt_Tag_10_Clιck 204 205 End Sub 206 207 Sub Tag_ll_Clιck () 208 On Error GoTo Err_Tag_ll_Clιck 209 210 Dim DocName As String 211 212 DocName = "Listll" 213 DoCmd OpenReport DocName, A_PREVIEW 214 215 Exιt_Tag_ll_Clιck: 217 218 Err_Tag_ll_Click : 219 MsgBox Error$ 220 Resume Exιt_ϊag_ll_Clιck 221 222 End Sub 223 224 Sub Tag_12_Clιck () 225 On Error GoTo Err_Tag_12_Clιck 226 227 Dim DocName As String 228 229 DocName = "Lιstl2" 230 DoCmd OpenReport DocName , A PREVIEW 231 X \PCHASER\NATIONAL MDB Tuesday, October 21 , 1997 Form Pnnt Menu Page 77 232 Exιt_Tag_12_Clιck: 234 235 Err_Tag_12_Clιck: 236 MsgBox Error$ 237 Resume Exιt_Tag_12_Clιck 238 239 End Sub 240 241 Sub Tag_13_Clιck () 242 On Error GoTo Err_Tag_13_Clιck 243 244 Dim DocName As String 245 246 DocName = "Lιstl3" 247 DoCmd OpenReport DocName, A_PREVIEW 248 249 Exιt_Tag_13_Clιc : 251 252 Err_Tag_13_Clιck: 253 MsgBox Error$ 254 Resume Exιt_Tag_13_Clιck 255 256 End Sub 257 258 Sub Tag_14_Clιck () 259 On Error GoTo Err_Tag_14_Clιck 260 261 Dim DocName As String 262 263 DocName = "Lιstl4" 264 DoCmd OpenReport DocName, A_PREVIEW 265 266 Exιt_Tag_14_Clιck : 268 269 Err_Tag_l _Clιck: 270 MsgBox Error$ -:71 esune Exιt_Tag_»4_Clιck 272 273 End Sub 274 275 Sub Tag_15_Clιck () 276 On Error GoTo Err_Tag_15_Clιck 277 278 Dim DocName As String 279 280 DocName = "Lιstl5" 281 DoCmd OpenReport DocName, A PREVIEW 282 X \PCHASER\NATIONAL MDB Tuesday, October 21 , 1997 Form Print Menu Page 78 283 Exιt_Tag_15_Clιck : 285 286 Err_Tag_15_Clιck : 287 MsgBox Error$ 288 Resume Exιt_Tag_15_Clιck 289 290 End Sub 291 ?92 Sub Tag_16_Clιck () 293 On Error GoTo Err_Tag__16_Clιck 294 295 Dim DocName As String 296 297 DocName = "Lιstl6" 298 DoCmd OpenReport DocName, A_PREVIEW 299 300 Exιt_Tag_l6_Clιck: 302 303 Err_Tag_l6_Clιck : 304 MsgBox Error$ 305 Resume Exιt_Tag_16_Clιck 306 307 End Sub 308 309 Sub Tag_17_Clιck () 310 On Error GoTo Err_Tag_17_Clιck 311 312 Dim DocName As String 313 314 DocName = "Lιstl7" 315 DoCmd OpenReport DocName, A_PREVIEW 316 317 Exιt_Tag_17_Clιck: 319 320 Err_Tag_17_Clιck : 321 MsgBox Error$ 322 Resume Exιt_Tag_17_Clιck 323 324 End Sub 325 326 Sub Tag_18_Clιck () 327 On Error GoTo Err_Tag_18_Clιck 328 329 Dim DocName As String 330 331 DocName = "Listlβ" 332 DoCmd OpenReport DocName, A PREVIEW 333 X \PCHASER\NATIONAL. MDB Tuesday, October 21 , 1997 Form Print Menu Page 79 334 Exιt_Tag_18_Clιck: 336 337 Err Tag_18_Clιck: 338 MsgBox Error? 339 Resume Exιt_Tag_18_Clιck 340 341 End Sub 342 343 Sub Tag_19_Clιck () 344 On Error GoTo Err_Tag_19_Clιck 345 346 Dim DocName As String 347 348 DocName = "Lιstl9" 349 DoCmd OpenReport DocName, A_PREVIEW 350 351 Exιt_Tag_l9_Clιck : 353 354 Err_Tag_l9_Clιck : 355 MsgBox Error$ 356 Resume Exιt_Tag_19_Clιck 357 358 End Sub 359 360 Sub Tag_2_Clιck () 361 On Error GoTo Err_Tag_2_Clιck 362 363 Dim DocName As String 364 365 DocName = "Lιst02" 366 DoCmd OpenReport DocName, A_PREVIEW 367 368 Exιt_Tag_2_Clιc : 370 371 Err_Tag_2_Clιck : 372 MsgBox Error$ j'j Resume Exιt_Tig_2_Clιck 374 375 End Sub 376 377 Sub Tag_20_Clιck () 378 On Error GoTo Err_Tag_20_Clιck 379 380 Dim DocName As String 381 382 DocName = "Lιst20" 383 DoCmd OpenReport DocName, A_PREVIEW 384 X,\PCHASER\NATIONAL MDB Tuesday, October 21 , 1997 Form Print Menu Page: 80 385 Exιt_Tag_20_Clιck 387 388 Err_Tag_20_Clιc : 389 MsgBox Error$ 390 Resume Exιt_Tag_20__Clιck 391 392 End Sub 393 394 Sub Tag_21_Clιck () 395 On Error GoTo Err_Tag_21_Clιck 396 397 Dim DocName As String 398 399 DocName = "Lιst21" 400 DoCmd OpenReport DocName , A_PREVIEW 401 402 Exιt_Tag_21_Clιc : 404 405 Err_Tag_2l_Clιck : 406 MsgBox Error$ 407 Resume Exιt_Tag_21_Clιck 408 409 End Sub 410 411 Sub Tag_22_Clιck () 412 On Error GoTo Err_Tag_22_Clιck 413 414 Dim DocName As String 415 416 DocName = "Lιst22" 417 DoCmd OpenReport DocName , A PREVIEW 418 419 Exιt_Tag_22_Clιck: 421 422 Err_Tag_22_Clιck : 423 MsgBox Error$ 4 Rasume Exιt_Tag_22_CLιc 425 426 End Sub 427 428 Sub Tag_23_Clιck () 429 On Error GoTo Err_Tag_23_Clιck 430 431 Dim DocName As String 432 433 DocName = "Lιst23" 434 DoCmd OpenReport DocName , A PREVIEW 435 X:\PCHASER\NATIONAL.MDB Tuesday, October 21, 1997 Form: Print Menu Page: 81 436 Exit_Tag_23_Click : 437 Exit Sub 438 439 Err_Tag_23_Click : 440 MsgBox Error$ 441 Resume Exit Tag 23 Click 442 443 End Sub 444 445 Sub Tag 24 Click () 446 On Error GoTo Err_Tag_24_Click 447 448 Dim DocName As String 449 450 DocName «= "List24" 451 DoCmd OpenReport DocName, A_PREVIEW 452 453 Exit_Tag_24_Click : 454 Exit Sub 455 456 Err_Tag_24_Click: 457 MsgBox Error$ 458 Resume Exit_Tag_24_Click 459 460 End Sub 461 462 Sub Tag_3_Click () 463 On Error GoTo Err_Tag_3_Click 464 465 Dim DocName As String 466 467 DocName = "List03" 468 DoCmd OpenReport DocName, A_PREVIEW 469 470 Exit_Tag_3_Click: 471 Exit Sub 472 473 Err_Tag_3_Click: 474 MsgBox Error$ 475 Resuma Exιr_Tag_3_Click 476 477 End Sub 478 479 Sub Tag_4_Click () 480 On Error GoTo Err_Tag_4_Click 481 482 Dim DocName As String 483 484 DocName = "List04" 485 DoCmd OpenReport DocName, A PREVIEW 486 X.\PCHASER\NATIONAL.MDB Tuesday, October 21 , 1997 Form: Print Menu Page: 82 Err_Tag_4_Clic : MsgBox Error$ Resume Exιt_Tag_4_Clιck End Sub Sub Tag 5_Clιck () On Error GoTo Err_Tag_5_Clιck Dim DocName As String DocName = "L st05" DoCmd OpenReport DocName, A_PREVIEW Exιt_Tag_5_Click : Err_Tag_5_Clιck: MsgBox ErrorS Resume Exιt_Tag_5_Clιck End Sub Sub Tag_6_Clιck () On Error GoTo Err_Tag_6_Clιck Dim DocName As String DocName = "Lιst06" DoCmd OpenReport DocName, A_PREVIEW Exιt_Tag_6_Clιck : Err_Tag_6_Clιck : MsgBox Error$ Resume Exιt_τeg_t_ lι k End Sub 533 534 535 DocName = "Lιst07" 536 DoCmd OpenReport DocName, A_PREVTEW 537 X:\PCHASER\NATIONAL.MDB Tuesday, October 21 , 1997 Form. Print Menu Page. 83 538 Exιt_Tag_7_Clιck: 539 Exit Sub 540 541 Err_Tag_7_Clιck : 542 MsgBox Error$ 543 Resume Exιt_Tag_7_Clιck 544 545 End Sub 546 547 Sub Tag_8_Clιck () 548 On Error GoTo Err_Tag_8_Clιck 549 550 Dim DocName As string 551 552 DocName = "ListOS " 553 DoCmd OpenReport DocName, A_PREVIEW 554 555 Exιt_Tag_8_Clιck: 557 558 Err_Tag_8_Clιc : 559 MsgBox Error$ 560 Resume Exιt_Tag_8_Clιck 561 562 End Sub 563 564 Sub Tag_9_Clιck () 565 On Error GoTo Err_Tag_9_Clιck 566 567 Dim DocName As String 568 569 DocName = "Lιst09" 570 DoCmd OpenReport DocName, A_PREVIEW 571 572 Exιt_Tag_9_Clιck : 574 575 Err_Tag_9_Clιck : 576 MsgBox Error$ 577 Resume Exιt_Tag_9_Clιck 578 579 End Sub 580 CDINFO . DAT An ASCII file used by Paper Chaser when CDs are used. It is set up in the following manner. "Yes" implied the case uses CDs. 2 is the Length of the image filenam e prefix. These are both on the first line. Each disk is given its own line. The first nu ber is the disk number, the second is the starting document number and the third is the ending document number for the CD. The numbers are separated by commas. CDINFO.DAT mu st reside in the case directory. EXAMPLE YES, 2 1, 00001, 05000 2, 05001, 05799 'Option Explicit 'Deflnt A-Z 'Allows program to float on top of all programs 'Private Declare Function SetWindowPos Lib "user" (ByVal h%, ByVal hb%, ByVal X%, ByVal Y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer 'reads ini files Private Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lp ApplicationName As String, IpKeyName As Any, ByVal IpDefault As String, ByVal IpReturnedString As String, ByVal nSize As Integer, ByVal IpFile Name As String) As Integer Dim ms_FileSavePath$ Dim ms_buttonWithFocus$ Dim ms_DataBaseName$ Const OFN_HIDEREADONLY = &H4& Private Sub buttonToggle ( ) On Error Resume Next cmdSave . Enabled = Not cmdSave .Enabled cmdScan. Enabled = Not cmdScan. Enabled cmdScan90.Enabled = Not cmdScan90.Enabled cmdScanSave .Enabled = Not cmdScanSave .Enabled cmdSetUp. Enabled = Not cmdSetUp. Enabled 'reset the focus back to the correct button Select Case ms_buttonWithFocus$ Case "cmdScan" cmdScan . SetFocus Case "cmdScan90" cmdScan90. SetFocus Case "cmdScanSave" cmdScanSave . SetFocus End Select End Sub Private Sub chkSaveToDataBase_Click ( ) If chkSaveToDataBase. Value = 1 Then Call pathlnfo 'gets the DB and paths to save images Else ms_FileSavePath$ = App. Path 'save images to the default path ' add ' \ ' to path if needed Tf Riσh " t"(ms FileSave??t $ 1) ~> "\" Then ms τ ileSa τ e?3th$ = s FileSavePath$ & "V" End If End Sub Private Sub cmdSave_Click ( ) On Error GoTo SaveError If wmObject. PageCount = 0 Then Exit Sub Dim liFages% Call buttonToggle Screen .MousePointer = 11 Load frmDisplay frmDisplay . Show If chkAutoDeskew. Value = 1 Then Call Deskewlmage frmDisplay .Hide Unload frmDisplay liPages% = wmObject . PageCount wmObject . DocumentName = txtPrefix. Text & txtSufix . Text ' [SaveAsLocal filename, fpage, cpages, fOverwrite] wmObject . SaveAsLocal ms_FileSavePath$ & txtPrefix . ext & txtSufix.Te xt & ".tif", 1, liPages%, 1 If chkSaveToDataBase. Value = 1 Then Call dbWrite Call numbersUpdate ' Close the current document, even if it has been modified but not s aved. wmObject . CloseDoc Screen. MousePointer = 0 Call buttonToggle Exit Sub SaveError : MsgBox "Errorf " & Err. Number & " " & Err . Description Resume Next End Sub Private Sub cmdScan_Click ( ) ms_button ithFocus$ = "cmdScan" Call buttonToggle Dim liPages% liPages% = wmObject . PageCount liPages% = liPages% + 1 ' [Scan fpage, incrPage, maxPages, flags] wmObject . Scan liPages%, 1, -1, 0 txtBatesENum.Text = Format (Int (txtBatesBNum. Text ) + wmObject . PageCou nt - 1, "0000000") Call buttonToggle End Sub Private Sub cmdScan90_Clic ( ) ms_button ithFocus$ = "cmdScan90" Call buttonToggle Dirr ii _-'~""'" r * ■ liPages% = wmObject . PageCount liPages% = liPages% + 1 ' [Scan fpage, incrPage, maxPages, flags] wmObject . Scan liPagesl, 1, -1, 1 txtBatesENum.Text = Format (Int (txtBatesBNum. Text) + wmObject . PageCou nt - 1, "0000000") Call buttonToggle End Sub Private Sub cmdScanSave_Clic ( ) ms_button ithFocus$ = "cmdScanSave" Call buttonToggle Screen. MousePointer = 11 1 [Scan fpage, incrPage, maxPages, flags] wmObject . Scan 1, 1, 1, 0 txtBatesENum.Text = txtBatesBNum. Text ' [SaveAsLocal filename, fpage, cpages, fOverwrite] If chkAutoDeskew. Value = 1 Then Call Deskewlmage wmObject . DocumentName = txtPrefix. Text & txtSufix. Text wmObject . SaveAsLocal ms_FileSavePath$ & txtPrefix . Text & txtSufix.Te xt & ".tif", 1, 1, 1 If chkSaveToDataBase. Value = 1 Then Call dbWrite Call numbersUpdate ' Close the current document, even if it has been modified but not s aved. wmObject . CloseDoc Screen. MousePointer = 0 Call buttonToggle Exit Sub SaveError : MsgBox "ErrorS " & Err. Number & " " & Err . Description Resume Next End Sub Private Sub cmdSetup_Click ( ) ' Display the Scanner Setting dialog box wmObject . ScanSetup Call settingsGet End Sub Private Sub db riteO On Error GoTo DBError ' Open "c:\TESTFILE.TXT" For Append As 1 ' Open file for output. ' Print #1, txtPrefix . ext & txtSufi . Text & ", "; txtPrefi . Text & t xtSufix.Text & ".tif, " ; txtBatesPre . Text & txtBatesBNum. Text & ", " ; t xtBatesPre.Text & txtBatesENum.Text ' Write data to file. Close #1 ''check the DOC NUMBER from Document Info een used taBaseName$) lut-ϊli -- XI1-.OJ Set mdsChaser = gdb. OpenRecordset (strSQL, dbOpenDynaset) mdsChaser.FindFirst "[Doc Number] = " & " • " & txtSufix. Text & " '" If mdsChaser .NoMatch Then mdsChaser .AddNew 'write data to database Else mdsChaser .Edit Overwrite existing data End If mdsChaser ! [Doc Number] = txtSufix. Text mdsChaser! [Entry Info] = txtPrefix . Text & txtSufix . Text & ".tif" mdsChaser ! [Beg Bates #] = txtBatesPre. Text & txtBatesBNum. Text mdsChaser ! [End Bates #] = txtBatesPre . Text & txtBatesENum.Text mdsChaser . Update mdsChaser. Close Exit Sub DBError: MsgBox "Errorjf " & Err. Number & " " & Err . Description chkSaveToDataBase. Value = 0 ms_FileSavePath$ = App. Path Exit Sub End Sub Private Sub Deskewlmage ( ) On Error Resume Next If chkAutoDeskew. Value = 0 Then Exit Sub Dim docPages% Dim curPage% docPages% = wmObject . PageCount For curPage% = 1 To docPagesl frmDisplay . lblPages . Caption = "Deskewing page " & curPagel & " of " & docPages% & "." frmDisplay. pnlPages . FloodPercent = curPage% / docPages% * 100 wmObject . PageDeskew curPage% DoEvents Next curPage% frmDisplay . lblPages .Caption = "Saving TIFF file." End Sub Private Sub Form_Load() 'Dim li_OnTop% 'li_OnTop% = " SetWindowPos (Me.hWnd, -1, 0, 0, 0, 0, 1) ' Create a Watermark Professional object Me. Left = 0 Me. Top = 0 Set wmObject = CreateObject ( "Watermark. Automation" ) wmObject . ShowWindow 2 ' Show Watermark Window ms_FileSavePath$ = App. Path ' add 'V to path if needed If Right (ms_FileSavePath$, 1) <> "\" Then ms_FileSavePath$ = ms_Fil eSavePath$ & "\" Call settingsGet End Sub Private Sub Form_Unload (Cancel As Integer) ' Exit Watermark, even if the current document has been modified but not saved. 1 Setting wmObject to Nothing causes Visual Basic to unload Watermar k from memory wmObject .Exit Set wmObject = Nothing Set mdsChaser = nothing End Sub Private Sub settingsGet ( ) Dim sFileName$ Dim sSection$ Dim sKeyName? Dim sDefault$ Dim sReturn$ Dim iReturnSize% Dim iReturn% sSection$ = "FUJIGINE" sKeyName$ = "PageSize" sDefault$ = "" sReturn$ = Space$(25) iReturnSize% = 25 sFileName$ = "C:\windows\wmpro.ini" iReturn% = GetPrivateProfileString (ByVal sSection$, ByVal sKeyName$, sDefault$, sReturn$, iReturnSize%, ByVal sFileName$) Me. Caption = "Luke's WaterMark Scan Utility " & sReturn$ End Sub Public Sub pathInfo() On Error GoTo PathError Dim mdsPathlnfo As Recordset Dim strSQL$ 'choose a database with common dialog CommonDialogl . CancelError = True CommonDialogl . DialogTitle = "Select Database" CommonDialogl. Flags = OFN_HIDEREADONLY CommonDialogl. Filter = "Database files | *.mdb" CommonDialogl . Filterlndex = 1 CommonDialogl .Action = 1 ms_DataBaseName$ = CommonDialogl . filename 'check the database for the path of the images files Set gdb = OpenDatabase (ms_DataBaseName$) strSQL = "SELECT * FROM Preferences" Set mdsPathlnfo = gdb. OpenRecordset (strSQL, dbOpenDynaset) ' set the file save path to it ms_FileSavePath$ = mdsPathlnfo ! ImagePath ' add '\' to path if needed If Right ?mε FiieSa' t ePath$ . 1 ) <> "\" Then ms FileSavePath$ eSavePath$ & "V" mdsPathlnfo . Close Set mdsPathlnfo = Nothing Exit Sub PathError: If Err = 32755 Then ' cancel button was pressed chkSaveToDataBase. Value = 0 ms_FileSavePath$ = App. Path Exit Sub Elself Err = 3078 Then chkSaveToDataBase. Value = 0 MsgBox "The database choosen is either not a PaperChaser database , or it is corrupted" ms_FileSavePath$ = App. Path Exit Sub Else ' MsgBox "Errors " & Err. Number & " " & Err . Description chkSaveToDataBase. Value = 0 ms_FileSavePath$ = App. Path Exit Sub End If End Sub Public Sub numbersUpdate ( ) txtSufix.Text = Format (Int (txtSufix. Text) + 1, "00000") txtBatesBNum. Text = Format (Int (txtBatesENum. Text) + 1, "0000000") txtBatesENum.Text = Format ( Int (txtBatesENum. Text) + 1, "0000000") End Sub frmDisplay - 1 Option Explicit Private Sub Form_Load() Me. Top = (Screen. Height - Me. Height) / 2 Me. Left = (Screen. idth - Me. idth) / 2 End Sub frmWMScan - 1 'Option Explicit 'Deflnt A-Z 'Allows proαram to float on top of all programs 'Private ' Declare Function SetWindowPos Lib "user" (ByVal h%, ByVal hb%, ByVal X%, 3yVal Yϊ, ByVa 1 cx%, ByVal cy», 3yVal f%) As Integer 'reads mi files Private Declare Function GetPrivateProfileStπng Lib "Kernel" ( ByVal IpApplicatior.Name As String , IpKeyName As Any, 3yVal IpDefault As String, ByVal lpReturneα≤tring As String, ByVal r.Size As Integer, 3yVal pFileName As String) As Integer Dim ms_FιleSavePath$ Dim ms_button ιtnFocus$ Dim ms_Data3aseName$ Const OFN_HIDE?.EADONLY = &H4& Private Suo buttonToggle!) On Error Resume Next cmαSave.Er acieα = '-t c r " ,c !?v= . " -.abled cmdScan. Enaoied = Not cmdScan. Enabled cmdScan90.Enaoled = Not cmαScan90. Enaoled cmαScanSave . Enaoleα = Not c-nαScanSave . Enabled cmdSetUp. Enacleα = Not cmdSetUp. Enabled 'reset tr.e focus bac to the correct button Select Case r-s_rjuttonWιthFocus$ Case "cmαScan" cirαSca . SetFocus Case "craαScar.90" crnαScar.90. SetFocus Case "cacScanSave" cmcScanSave . SetFocus End Select End Sub Private Suo cnkSaveTcDataBase_Clιck ( ) If chkSaveTcDataEase. Value = 1 Then Call patnlnfo 'gets the D3 ana pa-ns to save images Else ms_FileSavePath$ = App. Path 'save images to tne αefau-t path 1 add 'V to oatn f neeαed If Riant 'r-s_F_leSavePath$, 1) <> "\" Tnen ιrs_FιleSave?atrS = r-s_F leSave?atr.S £, "\" End If End Suo Private Suo cn-.cSave_Cl-.c O On Error GoTo SaveError If wmObjec . PageCount = 0 Tnen Exit Sue Dim liPagest Call buttonToggle Screen. MousePointer = 11 Load frmDisplay frmDisplay. Show if chkA_.toDes ew. Value = 1 Then Call Desxewlmage frmDisplay . Hiαe Unload frmDisplay lιPages% = wmObjec . PageCount wmObject . Docur-er.tName = txtPre ix. Text & txtSufix. Text ' [SaveAsLoca. filename, fpage, cpages, fOverwrite) wmObjec . SaveA.sLocal ms_FιleSavePatn$ (, txtPrefix . Text t, txtSufix . Text 4 ".t f", 1, liPa esϊ, 1 If cnkSaveToDataBase. Value = 1 Then Call do/.'rita Call numoersUpαate ' Close tne current αocument, even f t r.as oeen mocifieα c_t net saved. wmObject . loseDoc Screen. MousePointer = 0 Call buttonToggle Exit Sub SaveError: MsgBox "Error* " & Err. umber & " " & Err . Description ..' Resume Next find Sub Private Sub cmdScan_Click ( ) ms_buttonWithFocus$ - "cmdScan" Call buttonToggle Dim liPages% liPages% - wmObject. PageCount liPages% - liPages% + 1 • [Scan fpage, incrPage, maxPages, flags] wmObject. Scan liPages%, 1, -1, 0 •txtBatesENum.Text - Format (Int (txtBatesBNum. Text) + wmOb ect . PageCount - 1, "0000000") Call buttonToggle End Sub Private Sub cmdScan90_Click() ms buttonWithFoeus$ - "cmdScan90" Call buttonToggle Dim liPages liPages* - wmObject .PageCount liPages* - liPages* + 1 '[Scan fpage, incrPage, maxPages, flags] wmObject. Scan liPages%, 1, -1, 1 'txtBatesENum.Text - Format (Int (txtBatesBNum. Text) + wmObject .PageCount - 1, "0000000") Call buttonToggle End Sub Private Sub cmdScanSave_Click( ) ms_buttonWithFocus$ - "cmdScanSave" Call buttonToggle Screen. MousePointer - 11 ' [Scan fpage, incrPage, maxPages, flags) wmObject.Scan 1, 1, 1, 0 'txtBatesENum.Text =■ txtBatesBNum.Text ' [SaveAsLocal filename, fpage, cpages, fOverwrite] If chkAutoDeskew.Value «■ 1 Then Call Deskewlmage wmObject . DocumentName - txtPrefix. Text & txtSu ix. Text wmObject.SaveAsLocal ms_FileSavePath$ ά txtPrefix.Text & LxtSufix.Text & ".til", 1, 1, 1 If ChkSaveToDataBase. Value - 1 Then Call dbWrite Call numbersUpdate ' Close the current document, even if it has been modified but not saved. wmObject.CloseDoc Screen. ousePointer - 0 Call buttonToggle Exit Sub SaveError: MsgBox "Error* " & Err. umber £ " " _ Err . Description Resume Next End Sub Private Sub cmdSetup_Click ( ) ' Display the Scanner Setting dialog box wmOb ect . ScanSetup Call settingsGet End Sub Private Sub dbWritef) On Error GoTo DBError ' Open "c:\TESTFT E.TXT" For Append As 1 ' Open file for output. 1 Print #1, txtPrefix.Text txtSufix. Text & ", "; txtPrefix.Text & txtSufix.Text S ".tif, "; txtBatesPre. Text & txtBatesBNum. Text & ", "; txtBatesPre. Text 4 txtBatesENum.Text • Write data t o file. Close #1 • ' check the DOC NUMBER rom Document Info •'to see if it has already been used frmWMScan - 3 Set gdb - QpenDatabase (mar DatβBaβeName$ ) strSQL * "SELECT * FROM. [Document Info] " Set mdsChaser -> gdb. OpenRecordset (strSQL, dbOpenDynaset) mdsChaser. indFirst " [Doc Number] - " £ " • " & txtSuf ix . Text & " ' " If mdsChaser. NoMatch Then mdsChaser . AddNew ' write data to database mdsChaser . Edit ' overwrite existing data End If mdsChaser I [Doc Number] » txtSufix. Text mdsChaser! [Entry Info] - txtPrefix.Text & txtSufix.Text & ".t'if" ' mdsChaser! [Beg Bates f] - txtBatesPre. Text & txtBatesBNum. Text ' mdsChaser! [End Bates #] - ' txtBatesPre. Text & txtBatesENum.Text mdsChaser! [Description] ■ • txtDescription.Text mdsChaser. Update mdsChaser. Close Exit Sub DBError: MsgBox "Error# " & Err.Number & " " & Err. Description C hkSaveToDataBase.Value - 0 ms FileSavePath$ - App. Path Exit Sub End Sub Private Sub Deskewlmage () On Error Resume Next If chkAutoDeskew. Value - 0 Then Exit Sub Dim docPagβs Dim curpagβ% docPagβs% - wmObject. ageCount For curPage% - 1 To docPages% frmDisplay. lblPages. Caption - "Deskewing page " & cjarPage% & " of " & docPages* & frmDisplay.pnlPages . FloodPercent - curPage% / docPages% * 100 wmObject. PageDeskew curPage* DoEvents Next curPage% frmDisplay. lblPages. Caption » "Saving TIFF file." End Sub Private Sub Form_Load() ' Dim 31 OnTop% •li_θnTop% - SetWindowPos(Me.hWnd, -1, 0, 0, 0, 0, 1) ' Create a Watermark Professional object Me. eft - 0 Me.Top - 0 Set wmObject - CreateObject ("Watermark. Automation") wmObject.ShowWindow 2 ' Show Watermark Window ms_FileSavePath$ - App. Path ' add ' V to path if needed If Right (ms_FileSavePath$, 1) <> "\" Then ms_FileSavePath$ - ms_FileSavePath$ 4 "\" Call settingsGet End Sub rrivate Sub Form_Unload( Cancel As Integer) ' Exit Watermark, even if the current document has been modified but not saved. ' Setting wmObject to Nothing causes Visual Basic to unload Watermark from memory wmObject.Exit Set wmObject - Nothing Set mdsChaser » Nothing End Sub Private Sub settingsGet ( ) Dim sFileNameS Dim sSection$ Dim sKeyNarae$ Dim sDefault$ Dim sReturn$ Dim iReturnSize% Dim iReturn% sSection$ - "FUJIGINE" sKeyName? - "PageSize" sDefauit? - "" sReturn? - Space? (25) iReturnSize% - 25 sFileName? « "C:\windows\wmpro.ini" iReturn% = GetPrivateProfileString (ByVal sSection?, ByVal sKeyName?, sDefault$, sReturn?, iR turnSize%, ByVal sFileName?) Me. Caption = "Luke's WaterMark Scan Utility " & sReturn? End Sub Public Sub pathlnfoO On Error GoTo PathError Dim mdsPathlnfo As Recordset Dim strSQL? 'choose a database with comrr.-rr; dialog CommonDialogl. CancelError - True CommonDialogl. DialogTitle - "Select Database" CommonDialogl. Flags - OFN_HIDEREADONLY CommonDialogl. ilter - "Database files | *.mdb" CommonDialogl. ilterlndex - 1 CommonDialogl.Action - 1 ms_DataBaseName$ - CommonDialogl . filename 'check the database for the path of the images files Set gdb = OpenDatabase (ms_DataBaseName?) strSQL = "SELECT * FROM Preferences" Set mdsPathlnfo -= gdb. OpenRecordset (strSQL, dbOpenDynaset) 'set the file save path to it ms_FileSavePath? ■» mdsPathlnfo! ImagePath ' add ' to path if needed If Right (ms_FileSavePath?, 1) <> " \ " Then ms_FileSavePath? - ms_FileSavePath? & "\" mdsPathlnfo . Close Set mdsPathlnfo = Nothing Exit Sub PathError: If Err « 32755 Then ' cancel button was pressed chkSaveToDataBase. Value ■= 0 ms_Fi.f>SavePathS = A p. Path Exit Sub Elself Err - 3078 Then ChkSaveToDataBase. Value - 0 MsgBox "The database choosen is either not a PaperChaser database, or it is corrupted" ms_FileSavePath? - App. Path Exit Sub Else ' MsgBox "Errortt " & Err. Number & " " & Err. Description ChkSaveToDataBase. Value - 0 ms_FileSavePath? = App. Path Exit Sub End If End Sub Public Sub numbersUpdateO txtSufix.Text = Format (Int (txtSufix. Text) + 1, "00000") 'txtBatesBNum. Text = Format (Int (txtBatesENum.Text) + 1, "0000000") 'txtBatesENum.Text » Format (Int (txtBatesENum.Text) + 1, "0000000") End Sub WMSCAN1 - 1 Option Explicit Global vrmObjec As Object ' The object handle to Watermark frmDisplay - 1 Option Explicit Private Sub Form_Load() Me. Top = (Screen. Height - Me. Height) / 2 Me. Left = (Screen.Width - Me.Width) / 2 End Sub f rmOCR - 1 ' Copyright (C) 1995 , 1996 Lωte Spence ' Last modified on 05/01/96 Option Explicit Deflnt A-Z Private Declare Function FindWmαow* Lie "user" 'ByVal IpClassNarne As Any, ByVal _pCaptιon As An y) 'Declare Sub ΞetCursorPos LID "User" (3yVal x As Integer, 3yVal y «s .nteger ) 'There's no need to reset mouse position with OmniPage Lite Dim SetUp Dim progra CaptionS D m programPathS D m FNameS Dim DocFNameS Dim filePathS Dim fileToGetS Dim numOfFιles% D m numSelecteαϊ D m percentDcnes ount* Private Sun c dExιt_Ciιck() End End Sub Private Sun c.ταProcess_Clιck ( ) Dim ιLoop% On Error Resume Next If Filel. filename = "" Then MsgBox "Please cnoose a file.", 0, "No f le se-ected." Exit Sub End If If Right (Filel. Path, lj = "\" Then filePatn = Filel. Patn Else filePatn = Filel. Patn & "\" End If numOfFilest = Filel . istCount For iLoopt = 0 To numOfFιles% - If Filel. Selected (ιLoo?%) τ τe~ r. mSeiectec; = numSi- ectccϊ - 1 Next iLoopt percentDonet = ICO \ numSelecteαt For iLoopi = 0 To numOfFilest - fileToGetS = Filei.L st (ιLoop%) If Filel . Seιεcteα(ι oop%) Tnen FName » f lePath & fileToGet DocFName = left? i ileToGe , , en ( ileToGet - 3)) procCotnt* = procCountt - 1 pnlDiss_a .Ca t tior. = "Processing " & orocCc-nt% s " cf " - ,τ_-≤e_ecteα Call Process DoEvents D nlPerc=r.tC .-.ole t e . FlooαP°rce^t = "l5orrp"rriT jer- - noα?er «r " r»<τo ^-nn ι -= End If Next iLoopt pnlDisplay .Caption = "Fmisneα processing at " 4 Time pnlPercentCompiete. FioocPercent = 0 procCountϊ = 0 numSelected% = 0 Filel . Refresr. End SUD Private SUD D rl_Cnange i ) Filel. Patn = D rl. Path End SUD Private Sub Drive l_Cnange ( ) On Error Resume Next frmOCR - 2 Dirl . Path = Drivel . Drive End Sub Pnvate SUD Fcm_Load ( ) On Error Resume Next Top = 100 Left = Screen. Width - frmOCR. Widtn - 100 Call mfoGet x% = Shell (programPatr.S, A ) frmOCR. Snow Dirl. Patn = "C:\" End Sub Private Sub Fcr^KouseMove (Button As Integer, Shift As Integer, x As Single, y As Single ) x = 1 y = ι End Sub Private SUD in:oGet ( ) On Error GoTo miError Open "lukesccr .mi" For Input As #1 Line Input fl, progra CaptionS ' Get complete line. Line Incut =1, progra Path$ ' Get complete line. Close *1 - iError : MsgBox "Error retrieving information from ' lukesocr . mi ' " E d Sub Private Sub mouse.nome ( ! ' need a routine to move mouse pointer to Dottom corner ' of the screen so that KordΞcan title oar αoesn't cnange ' if it αoes 73 program can't recognize ordScan Drogram ' SetCursorPos Screen .Kicth, Screen. Height End Sub Private Sub Process () AppActivate programCaptionS x% = Shell (programPatr.S i " " & FNameS, 4) Call mouseHome SendKeys "%F", True 'ALT F SendKeys "?", True 'R SendKeys "A", True 'A test% = 0 Do While test* = 0 x% = DoEvents ( ) test% = FmdWinαow (Oi, "Save As") Loop SendKeys DocFlameS SendKeys " ' Enter ) " test% = 0 Call mousencme : " -.ndKeys "'Enter)" • to overwrite f file a-reaαy exists Do While tests = 0 x% = DoEvents ( ) test* = FιndWmαow(C&, programCaritionS) Loop AppActivate "Luke's Automated OCR'mg Utility" End Sub frmDepoView - 1 Option Explicit Deflnt A-Z ' ' ' arrays Dim page ( ) As Long Dim finds () As Integer ' ' 'long Dim positions ' ' 'integers Dim pageNumber% Dim numOfPages% Dim startPosition% Dim f% Dim foundcount% Dim FirstPageEOPMarker% Dim iPageNumShown% ' ' 'strings Dim pathOfDepos$ Dim fileSource$ Dim εpLocations$ Dim new_Line$ Dim endOfPage$ Dim search$ Dim temp$ Dim nameOfDeposed$ Private Sub buttonReset ( ) On Error Resume Next ' reset page number buttons Select Case pageNumber% Case 0 ' no pages loaded cmdPagePrev. Enabled = False cmdPageFirst .Enabled = False cmdPageNext . Enabled = False cmdPageLast. Enabled = False Case 1 ' first page cmdPagePrev. Enabled = False cmdPageFirs . Enabled = False cmdPageNext .Enabled = True cmdPageLast .Enabled = True Case numOfPages ' last page cmdPagePrev. Enabled = True cmdPageFirst .Enabled = True cmdPageNext .Enabled = False cmdPageLast .Enabled = False Case Else ' all other pages cmdPagePrev. Enabled = True cmdPageFirst .Enabled = True cmdPageNext. Enabled = True cmdPageLast .Enabled = True End Select Select Case numOfPages% ' if only one page Case 1 cmdPageNext .Enabled = False cmdPageLast . Enabled = False End Select ' reset find word buttons Select Case foundcount% Case 0 ' no words found cmdWordPrev. Enabled = False cmdWordFirst .Enabled = False cmdWordNext. Enabled = False cmdWordLast .Enabled = False Case i ' only 1 occurance of word cmdWordPrev. Enabled = False cmdWordFirst . Enabled = False cmdWordNext .Enabled = False cmdWordLast .Enabled = False Case Else ' more than one occurance Select Case finds (f%) frmDepoView - 2 Case finds (1) ' first occurance of word cmαwordPrev. Enabled = False cmdWordFirst . Enabled = False cmdWordNext .Enabled = True cmαWorcLast .Enabled = True Case fines ifounαcount%) ' last occurance of word cmdWordPrev. Enabled = True cmαWordFirst .Enabled = True cmdWordNext . Enableα = False cmαWordLast. Enabled = False Case Else ' all ctner words cmdWorαPrev. Enabled = True cmαWorάFirst. Enabled = True cmαWordNext . Enabled = True c dWorαLast .Enabled = True End Select End Select ' reset wore buttons f no αepo s loadeα Select Case fiieSourceS Case "" cmdCopy.Enaoleα = False cmdWorcFmd. Enableα = False cmdWorcPrev. Enaolec = False cmdWorcF rs . naoleα = False cmdKorcNeκt. Enableα = False cmdWorcLast .Ξr.abieα = False Case Else cmdCcpy . Ξnaoleα = True cmdWordFinc naoleα = True End Select End Sub Private Sub cmdCopy_Clic ( ) Dim cbDeooInfoS cbDepoInfcS = "From tne αeposit on of " & nameOf eposeαS i ", page = " S iPageNu..Snownt ό new _Lιne$ Clipboard. Clear Clipboarα.SetTex t new_LmeS S coDepoInfoS & xtCopyPas e . ΞelText £ End Sub Private Sub cmα?agεFιrst_Click ( ) On Error Resume Next pageNun-oert = 1 Call pageDisplay End Sub Private SUD cmαPaσeLast_Clιc ( ) On Error Resume Next pageNuiroer* = r.urr.Of?ages% Call paσeDispiay Enα Sub On Error Resume Next pageNumaeri = pageNumnerϊ + 1 Call pageDisplay Enα Sub Private SUD cmαPagePrev_Clιck ( ) On Error Resus-e Next pageNumoert = pageNumoert - 1 Call pageDisplay End Sub Private SUD cmαWordFιr.d_Click ( ) On Error Resure Next Dim pageDιspiayed% pageDispiayeα* = pageNumber% DCtDisaiav. V siole = True frmDepoView - 3 searchS = InputBoxS ("Please enter the worα you wish to searcn for.", "Word Search", "") If searchS = " ' Then -ΛIL SUO ' reset variables £% - 0 foundcount = 0 Call wordFind If f% < 1 Then pageNu berϊ = pageDisplayeαS Tne word '" & searchS & "' was r.ct found.", C, "Not Founc." En pageNumoer% = finds if%) Call pageDisplay End Sub Private Sub cmdWordFιrst_Clιck ( ) On Error Resume Next f% - 1 pageNumber* = fιnαslf ) Call pageDisplay End Sub Private SUD cmαWorαLast_Clιc ( ) On Error Resume Next f% = founαcountϊ pageNu Dert = finds (ft) Call pageDisplay End Sub Private SUD cmαWordNext_Clιc ( ) On Error Resume Next f% - f% + 1 pageNumoert = finds (f%) Call pageDisplay End Sub Private Sub cmαKorαPrev_Clιc ( ) On Error Resume Next nes (f%) Private Sub ceposedNa e ' ' Dim firstPageS Dim posMarkert Dim posEOLll rceS For Binary Access Reaα As fl f rstPsg°S = Inputs '.C9£, l v Close #1 posMarker% = InStr (1, firstPageS, "deDositio of", 1) posEOLl% = I Str (posKarker , firstPageS, new_Lιne$) posE0L2% = InStr (posE0Ll% + I, firstPageS, new_LιneS' posEOL3% = InStr (posΞOL2% + 1, firstPageS, rew_LιneS, tempS = MidS (firstPageS, (posKarκer% - ■■ 13 , .posEOLl? - 'posKarr.ert - 13 ) ) ' If Len (Tr (tempS) ) > 3 Then nameOfDeooseαS = fnMakeAlor.a (tempS) Else tempS = MidS (firstPageS, pcsEOLl%, (pcsEGI.2% - pcsE0Ll%)) nameOfDeposedS = fnMakeAlpna (tempS ) If Trιm(nameOfDeoosedS) = "" Then tempS = MidS (firstPageS, posEOL2%, ,posEOL3% - posEOL2%)) nameOfDeDoseαS = fnMakeAlona ( empS , End If End If frmDepoView - 4 nameOfDeposedS = Trim (nameOfDeposedS) Private Sub αepoSeiecti) On Error Resume Next fr DepoView. Dialoguel .Cance Error = False frmDepoView. Dialoguel . DialogTitle = "Open Deposition" frmDepoView. Dialoguel. Flags = OFN_K DEREADONLY frmDepoView. Dialoguel . ImtD r = σatnOfDeposS frmDepoView. Dialoguel. Filter = "All files I'.*) I*.*" frmDepoView. Dia oguel. Filterlndex = 1 frmDepoView. Dialoguel .Action = 1 fileSourceS = frmDepoView. Dialoguel . filename End Sub Private Sub αetermneFormat ( ) On Error Resume Next Dim charS Dim posFcαr.a; ODen fileSourceS For Binary Access Reaα As SI cnarS - Inputs (5120, 1) Close SI posFound% = InStricharS, endCfPageS) If posFoundt = 0 Then Call pagePositionsAmicus Else Call DaαePositionsA.scn End If End Sub Private Function fnGetF rstLine (pageOfText As String) As String Dim eolPost Dim sFirstLmeOfTextS eolPos* = InStr (pageOfText, new_LmeS) sFirstLmeOfTextS = MidS (pageOfTex , 1, eolPos ) fnGetFirstLine = SFirstLmeOfTextS End Function Private Function fnGetLastLme (pageOfText As String) As String Dim eolPost 'remove lost eo marker pageOfTextS = MidS (pageOfTextS, 1, (Len (pageOf extS ) - 2)) 'remove all otner eoi markers ά whittle αown pageOfText Do While I Str (pageOfTexts, new_LmeS) eolPost = InStr (pageOfText, new_Lme$) pageOfTextS = MidsIpageOf ext , eolPos 1) Loop fnGetLastLme = pageOfTextS Enα Function Private Function rnMaκeAιpha (firstPageOfDepo As String) As String Dim charS Dim iloopt For iloopt = 1 To Len (firstPageO DepoS) charS = MidS ifirstPageOfDepoS, iloopt, 1) Select Case Asc(cnarS) Case 32, 65 To 90, 97 To 122 alphas = alpnaS & charS End Select Next iloopt fr.XakcAipr.a - alphas End Function Private Function fnMakeNumenc (alphaNumeric A.s String) As Integer Dim cnarS Dim numeric* Dim iloopt For iloop = 1 To Le (alDhaNumericS) frmDepoView - 5 charS - MidS (alphaNumencS , ιloop%, 1) Select Case As<-(charS) Case 48 To 57 numeric* = numerιc% & CΙnt(charS) End Select Next iloopt fnMakeNumenc = numeric! End Function Private Sub Form_Load ( ) On Error Resume Next frmDepoView. Left = 'Screen. Width - frmDepoView. Width) / 2 frmDepoView. Top = (Screen. Height - frmDepoView. Height) / 2 Call outtonReset Call screenSize pathOfDeposS = Commands " if pathOfDeposS = "" Then pathOfDeposS = App. Path Else ' here we want code to redace images/ witn depos/ pathOfDeposS = Lefts (pathOfDeposS, (InStr(l, pathOfDeposS, "Images", 1) - 1)) 5 "DeposV End ' If endOfPageS = ChrS(12) ne _LmeS = ChrS (13) End Sub Private Sub Form_Resιze ( ) Call screenSize End Sub Private Sub getPageNumcer ( ) On Error Resume Next Dim iValidSearcnt Dim lFirstLmet Dim iLastLmet Dim errCodet Dim sFirstLineS Dim sLast eS Dim pageFro DepoS pageFromDepoS = txtCopyPaste.Text errCoπe* » 0 sFirstLineS = fnGetFirstLine (pageFromDepoS) sLastLmeS - fnGetLastLme (pageFromDepoS ) ιFιrstLιne% = fnMakeNumenc (sFirstLineS) ιLastLιne% = fnMakeNumenc (sLastLmeS ) ' check for page numDers with word 'page' eσ "Page 148" iValidSearcnt = InStr (1, sFirstLineS, "page", 1) If iValιdSearcn% > 0 Then ival dSearcht = InStril, sLastLmeS, "page", 1} If ιValιcSearcn% > C Then If iLastLmet > 0 Then iPageNumShownt = iLastLmet Exit Sub End If End If 1 check for amicus style numoer eg "00148" On Error GoTo a icusLastLine Select Case Len (TrimfsFirstLineS ) ) Case 4, 5 iPageNumShownt = CInt (Trim (sFirstLineS) ) Exit Sub End Select amicusLastLine : On Error GoTo αenericNumoer rrDepoView - 6 Select Case Len (Trim (SLastLmeS) ) = CInt (Trim (sLastLmeS) ) End Select genericNumber : ' cneck for generic numoer eg "148" On Error Resume Next Select Case Len (Trim (SFirstLineS ) ) Case 1, 2, 3 If iFιrstLιne% > 0 Then iPageNumΞnownt = ιFιrstLιne% Exit Sub End If End Select Selec (TrimisLastLineS) ) Case If % > 0 Then nownt = ιLastLιne% En End Select ιPageNumΞnown% = 0 End Sub Private Sub mnuEdιtCopy_Clιc ( ) cmdCθDy_C1ick End Sub Private SUD mnuEc tFιr.d_Clιck ( ) cmdWorcFmd_Clιcκ End Sub Private SUD mnuF leExit Click () End Ξr.d Sub Private Suo ιrr.uFιleOpεn_Clιcκ ( ) On Error Pesurre Next 'reset a few variaDles pageNumber% - 1 searchS = "" pctDisp ay. VisiDle = True Call αepoSelect If frmDepoView. Dialoguel. filename = "" Tnen Ex t Sub 'Call αeterm r.eFormat Call pagePos tionsAsc-i 'or pagePoε tionsAricus Call pageLocations Call αeposeαName Call paαeDiΞD ay End Sub Private SUD mnuFιlePnnt_Clιck ( ) On Error Resume Next Dim pos& Dim EOPMarkerS Dim pageListlS Dim founα% Dim currentLineS Dim pageListlTri S Printer. FcntBoiα = True Printer . FontSize = 12 Printer . FontName - "Courier" Printer .FontSize = 12 For x% = 1 To numOfPages* Printer. Print " " Printer . Print " " • Printer . Print " ": Printer. Print " " Printer. Print " ": Printer . Print Printer . Frir.t " ": Printer . Print " " pageNumoert = x% DOSS = 1 ϊrnDepoView - 7 If pageNumber% = 1 Then Jf F- rrrPageFOPMar er% = 1 Then DOS4 = 2 Else pos. = page (pageNumber - 1) + 1 End * If EOPMarkerS = page (pageNumDer% ) Open fileSourceS For Binary A.ccess Read As ?i Seek fl, pos& pageListlS = InputS ( (ΞOPKarker - - pos&), 1) Close #1 Do Wnile Len (pageListlS ) <> 0 founα% = InStr (pageListlS, new_LmeS) currentLineS = MidS (pageListlS, 1, (founαt - 1;) If Trim (currentLineS) <> "" Then pageListlTrimS = pageListlTnmS & currentLineS i Cr.rS ( 13 ) S Cr.rS ( lO ) End " If pageListlS = !-:ιdS (pageListlS, ( founc% i- 2)) Loop Pnnte . ?_ ι..t paσ-l stlTnmS Printer .NewPage pageListlTnmS = "" Next x Printer. EnαDoc End SUD Private SUD mnuF iePrιr.terConαensed_Clιck ( ) On Error Resume Next Dim x% Dim pos& Dim EOPMarkeri Dim pageListlS Dim found% Dim currentLineS Dim pageListlTnmS Dim liPrmtPosX* Dim lι?rmt?csY% D m liQuaαrant liQuadrant* = 1 Printer . FontBolc = True Printer . FontSize = 7 Printer . FcntN^-'e = "Coun=r" Printer . FontSize = For x% = 1 To numOfPagest pageNumbert = y.t pos4 = 1 If pageNumDer* = 1 Then If FirstPageEOP artcert = 1 Tnen pos& = 2 Else posi = page itacet ^ um.Der - 1 T 1 End * If EOPMarκer& = page icaαeNumoer * Open fileSourceS For Binary Access Reaα As si Seek SI, posi pageListlS = Incu $ ι (EOPKarxsri - posd, 1) Close Sl If l Quaαrant% = 1 Then liPnntPosX* = 0 lιPnntPosY% = 0 lιQuaαrant% = 2 Elself liQuaαra t* = 2 Then liPrmtPosX* = 0 liPrmtPosYϊ = Printer . ScaleHeignt / 2 lιQuadrant% = ; Elself liQuaαrar.t* = 3 Then liPrintPosXV = Printer . ScaleWictn / 2 lιPrιntPos.% = 0 lιQuadrant = - Elself liQuaαrar.tt = 4 Then liPrmtPosXt = Printer . ScaleWidth / 2 rrm.DeDoView - δ lιPrmtPosY% = PnnLβr .ScaleHeight / 2 lιQuaαr=ιnt% = 1 End If Printer. C rrεntY = lιPrιntPosY% Printer. Print " ": Printer. Print " " Do While Le (pageListlS) <> 0 found% = InStr (pageListlS, new_LιneS) currentLineS = MidS (pageListlS, 1, ,round% - 1 ) ) If Trim (currentLineS) <> "" Tnen 'pageListlTnmS = pageListlTnmS L currentLineS & ChrS ( 13 ) S, CnrStlC, Printer. CurrentX = lιPrmtPosX Printer. Print currentLineS & new_LmeS End If pageListlS = MidS (pageListlS , Counαt + 2)) Loop pageListlTnmS = "" If x% Moα 4 = 0 Then Printer. Line ( (Printer . ScaleWictn / 2), 0) -(' Printer . Sc-leWi-- - / 2 Pr te. Ccalehe: ght) Printer .Line ( 0, (Printer. ScaleHeicnt / 2) )-( Printer . ScaleWidtn, ( Printer . Scaleheight / 2)) Printer. ! ■ϊewPage End If Next x% Printer . ncDoc -_. -.d SUD Private Sub mnuF lePπnterSetup_Clιck ( ) Dim CancelFlag As Integer CancelFlag = True On Error Resure Next Dialoguel .CancelError = True Dialoguel. Flags = ?D_PRINTΞETU? Dialoguel .Action = 5 If (Err = 0) Tnen CancelFlag = False End T If (CancelFlag = True) Tnen Ex t Sub Enα Sub Private S_,b mnut-.eipADθut_Clιck ( ) Load frmAbout frmAbout . Show End Sub Private SUD pageDisoiay ( ) On Error Resure Next Dim found% Dim posά Dim currentLineS Dim EO?Marκer. Di pageListlS Dim pageListlTnmS posi = 1 If pageNumoert = 1 Then If FιrstPaαeΞOPMarker% = 1 Then DOSS = 2 Else L.OS& = Dage (DageNunber - 1 ) ■ 1 End If ΞOPMarker. = page (pageNumber% ) pctDisp ay . Cls txtCopyPaste . Clear Open fileSourceS For Binary Access Reac As fl Seek si, post. r.DepoView - S pageListlS = Inputs ( (EOPMa- er& - pos& l , 1 ) Close S I Do While Len (pageListlS) <> 0 founα% = InStr (pageListlS, new_Lιne$) currentLineS = MidS (pageListlS , 1, (founα% - I ) ) If Tri (currentLineS) <> "" Then If searchS = "" Then pctDiΞDlay. Print currentLineS pageLis t lTnmS = pageListlTnmS & currentLineS i CnrS ( 13 ) ό ChrS ( lO) Else pageListlTnmS = pageListlTnmS i. currentLineS i. ChrSd-', i CnrS ( lO) If ' lnStrd, currentLineS, searchS, 1) Then pctDisplay. Print MidS (currentLineS, 1, (InStr (1, currentLineS, searchS, ij) - 1); pctDisplay ForeColor = SKFF ' red pctDisplay. Print MidS ! currentLineS, (InΞtril, currentLineS, searchS, 1)), Lenfses rchS) ), DctDisplay. ForeColor = &K0 ' black DCtDisp ay. Print MidS (currentLineS, v ( I Str, 1, =S, searcnS, 1)) - Len(s earchSD) Else pctDisplay. Print currentLineS End If End If End If pageListlS = MicS (pageListlS , (founα% + 2)) Loop txtCopyPaste.Te t = pageListlTnmS If InStr (txtCopyPaste.Text, searcnS, 1) Then pctScroll. V siD e = True txtCcpyPaste . V sic e = False Else pctScroll .VisiDie = False txtCcpyPaste .Visiole = True End If If searcnS = "" Then pctScroll .Visible = False tκtCopyPaste . VisiDie = True End If Call buttonReset Call getPageMumDer Me.Captιon~= "Deposition of " & na eOfDeDosedS 5 " Page - " S, ιPaαeNumShown% End Sub Private Sub pageLocations ( ) Dim found% ReDim paged To numOfPaσes%) x% - l " Do Wnile Len (eopLocationsS ) > 0 founc* = InStr (eopLocationsS, " ") If founct <> 0 Tnen page(xt> = Int (Mid (eoDLocationsS, 1, founα%)) eoDLocationsS = MidS (eoDLocations , !founα% f l κ* = x% T I Else Loop End Sub Private SUD pagePosit cnsAmicus ( ) f le format.", 64, "Unsuorjcrteα format. " ' On Error Resume Next ' Dim firstPageNumoert ' Dim nextPageNumoert ' Dim amicusPageNumoerS Dim trimCharS ' Dim cnarS frmDepoView - 10 Dim zerosS zerosS = "OOOC" numOfPages% = 0 Open fιleSource$ For Input As *1 Line Input #1, char$ trimCharS = Trιm(char$) fιrstPageNumber% = CInt (trιmChar$) Close SI 1 loop nextPageNumber% = nextPageNumber% T 1 amicusPaσeNumberS = Rights ( (zerosS & CStr (nextPageNumber% ) ) , 4) 'search for amicusPageNumber Open fιleSource$ For Binary Access Read As #1 Do Until EOF(l) ' find the number of end of page markers charS = Input$ (32768, 1) posFound% = InStr (char$, amicusPageNumberS ) If posFound% <> 0 Then iiαmui Pages * . = numOf Page_>% + 1 eopLocationsS = eopLocationsS & ( of f set Posιtιon& + pos Found% ) End I f offsetPositionS. = offsetPosιtιon& + 32768 Loop Close #1 Seek #1, 1 ' make adjustment if 1st page starts with EOP marker If Input$ (1, 1) = endOfPageS Then numOfPagesl = numOfPages% - 1 eopLocationsS = MidS (eopLocationsS, 3) FιrstPageEOPMarker% = 1' if first Dage starts with an EOP marker End If Seek il, LOF(l) ' make adjustment if last page has no EOF If Inputs (1, 1) <> endOfPageS Then numOfPages% = numOf?ages% + 1 eopLocationsS = eopLocationsS & FileLen ( fileSourceS) & " " End If Me. Caption = Me. Caption & " " & numOfPages% End Sub Private Sub pagePositionsAscn ( ) On Error Resume Next Dim charS Dim posFound% Dim of setPositionS Dim lastCharPositionά numOfPages% = 0 FιrstPageEOPMarker% = 0 ls"; i -rharPosιt on& = t'' , o'ptι"' , P t ;oιιr-r.B5) Open fileSourceS For Binary Access Read As SI Do Until EOF(l) ' find the number of end of page markers charS = Inputs (128, 1) posFound% = InStr (charS, endOfPageS) If posFound s „ <> 0 Then numOfPages = numOfPages% + 1 eopLocationsS = eopLocationsS & (offsetPosιtιon& + oosFound%) & End If of setPosi ιc & = of εetPosιtιon& + 128 Loop Seek #1, 1 ' make adjustment if 1st page starts with EOP marker If Inputs (1, 1) = endOfPageS Then numOfPages% = numOfPages% - 1 eopLocationsS = MidS (eopLocationsS, 3) FιrstPageEOPMarker% = 1 ' if first cage starts with an EOP marker End If frmDepoView - 11 Seek #1, LOF(l) ' make ac j jstment if last page nas no EOF Tf TrputSd 1) <> enαOfPageS Then numOfPages% = numOfPages% + 1 eopLocationsS = eopLocationsS & FileLen ( ileSourceS) & " " End If Close #1 End Sub Private Sub pctDιsplay_Cl ck ( ) txtCopyPaste. Visiole = True pctScroll .Visiole = False txtCopyPaste . SetFocus End Sub Private Sub screenSize () On Error Resume Next pctScroll .Top = cmdWordPrev. Height + cmdWordPrev. Top + 10 pctScroll. Left = 10 p-^Scroll .Wi cth = frmDepoView. ScaleWidth - 50 pctScroll .Height = frmDepoView. ScaleHeight - cmdPagePrev Height - 50 VScrolll. Top = 0 VScrolll.Left = pctScroll .Width - VScrolll .Width VScrolll. Height = pctScroll . Height VScrolll. Max = 100 VScrolll .LargeChange = 33 VScrolll. SmallChange = 16 pctDisplay. Top ■= 0 pctDisplay. Left = 0 pctDisplay. Width = pctScroll .Width - VScrolll .Width - 40 pctDisplay. Height = Screen. Height * 2 txtCopyPaste. Top = pctScroll . Top txtCopyPaste. Left = pctScroll. Left txtCopyPaste. idth = pctScroll .Width txtCopyPaste . Height = pctScroll . Height End Sub Private Sub VScrolll_Change ( ) 'pctDisplay. Top = -VScrolll .Value pctDisplay. Top = - (VScrolll .Value / 100) * ScaleHeight End Sub Private Sub wordFmαO On Error Resume Next Dim x% Dim lastPageNumber% Dim found% Dim ImeFromFileS Dim tempFindsS lastPageNumber% = 0 tempS = "" Open fileSourceS For Input As Si If Inputs (1, 1) = endOfPageS Then pageNumber% = 0 Exse pageNumber% = 1 End If Close #1 Open fileSourceS For Inout As 1 Do Until EOF(l) Line Input #1, ImeFromFileS If InStr (lineFro.πFileS, endOfPageS) Then pageNumber% = oageNumber% + 1 If InStr (1, ImeFromFileS, searchS, 1) Then If pa>-,e,>lumrjer% <-> ιastPageNumber% Then lastPageNumber% = pageNumber% tempS = tempS 4 pageNumber% & " " End If End If Loop Close #1 frmDepoView - 12 tempFindsS = tempS ' determine the number of numbers in this string th n redim an array ' to hold each individual number If tempS = "" Then Exit Sub ' no match found found% = 0 Do While Len(tempS) > 0 found% = InStr (tempS, " ") If found% <> 0 Then foundcount% = foundcount% + 1 tempS = MidS(tempS, (founds + 1)) Else Exit Do End If Loop 1 now extract each page # and put them into into the Finds ( ) array ' use Finds ( ) array to bounce around from page to page ReDim finds ( foundcount% + 1) tempS = tempFindsS For x% = 1 To foundcount% found% = InStr (tempS, " ") finds (x%) = Int (Mid(temp$, 1, (found%))) tempS = MidS(temp$, (found% + 1)) Next x% f% = 1 End Sub frmlntro - 1 Option Explicit Deflnt A-Z Private Sub displayText ( ) FontSize = 42 frmlntro. CurrentX = 32: frmlntro .CurrentY 52 ForeColor = QBColor(8) Print "Deposition Viewer" frmlntro. CurrentX = 30: frmlntro. CurrentY = 50 ForeColor = QBColor(15) Print "Deposition Viewer" frmlntro. CurrentX = 31: frmlntro. CurrentY = 51 ForeColor = QBColor(7) Print "Deposition Viewer" FontSize = 21 frmlntro. CurrentX = 82: frmlntro . CurrentY 302 ForeColor = QBColor(8) Print "Copyright 10SS, L ).~ Scenes" frmlntro. CurrentX = 80: frmlntro . CurrentY 300 ForeColor = QBColor(15) Print "Copyright 1996, Luke Spence" frmlntro. CurrentX = 81 frmlntro . CurrentY = 301 ForeColor = QBColor(7) Print "Copyright 1996, Luke Spence" End Sub Private Sub exitSpalshScreen ( ) frmDepoView. Show frmlntro. Hide Unload frmlntro End Sub Private Sub Form_Click() exitSpalshScreen End Sub Private Sub Form_KeyPress (KeyAscii As Integer) exitSpalshScreen End Sub Private Sub Form_Load ( ) frmlntro. Left = (Screen .Width - frmlntro .Width) / 2 frmlntro. Top = (Screen. Height - frmlntro . Height ) / 2 Load frmDepoView End Sub Private Sub Form_Paint ( ) Call displayText End Sub Private Sub Timerl_Timer ( ) exi_.Sr>alshScreen End Sub frmCases - 1 Option Explicit Deflft A-Z Dim sNewCaseS Private Sub cmdAdd_Click ( ) pctAddCase.Top = IstCases.Top pctAddCase.Le t = IstCases . Left lstCases .Visible = False pctAddCase. Visible = True End Sub Private Sub cmdCancelNames_Click ( ) IstCases .Visible = True pctAddCase. Visible = False End Sub Private Sub cmdOK_Click ( ) sNewCaseS = txtClient .Text & "/" £ txtMatter .Text lstCaces . Addltem sN^;Case$ IstCases. Visible = True pctAddCase .Visible = False End Sub Private Sub Form_Load() f mCases .Left = (Screen. Width - frmCases. Width) / 2 frmCases. Top = (Screen. Height - frmCases. Height) / 2 Dim sCaselnputS Dim sCaseNameS Dim sCasePathS Dim sFileNameS sFileNameS = App. Path & "cases. inf sFileNameS = "C:\vb30\cases.inf" Open sFileNameS For Input As #1 Do Until EOF(l) Line Input fl, sCaselnputS sCaseNameS = MidS (sCaselnputS, 1, InStr (sCaselnputS, 1) IstCases .Addltem sCaseNameS Loop Close #1 End Sub fr Browse - 1 Option Explicit Deflnt A-Z Dim sDirectoryPathS Private Sub cmdCancel_Click ( ) Call frmBrowseQuit End Sub Private Sub cmdOK_Click ( ) ' code to send back the selected directory name frmDepoView. Caption = sDirectoryPathS Call frmBrowseQuit End Sub Private Sub Dirl_Change ( ) sDirectoryPathS = dirl. Path End Sub Private Sub Drivel_Change ( ) On Error Resume Next dirl. Path = Drivel. Drive End Sub Private Sub Form_Load() frmBrowse. Left = (Screen. Width - frmBrowse. idth) / 2 frmBrowse. Top = (Screen. Height - frmBrowse . Height ) / 2 dirl. Path = " \ " End Sub Private Sub frmBrowseQuit ( ) frmBrowse . Hide Unload frmBrowse End Sub frmAbout - 1 Option Explicit Deflnt A-Z Private Sub cmdOK_Click ( ) frmAbout. Hide Unload frmAbout End Sub Private Sub Form_Load ( ) frmAbout. Left = (Screen. idth - rmAbout .Width) / 2 frmAbout. Top = (Screen. Height - rmAbout . Heigh ) / 2 ScaleMode = 3 End Sub Forml - 1 ' Copyriαht (C) 1995,1996, 1997 Tempest Software ' Last modified on 05/02/97 Option Explicit Deflnt A-Z Dim cancelButton% Dim totalFιles% Dim totalProcessed% rcentDone% Dim numOfFιles% Dim fileToGetS Private Sub cmdCancel_Clιc ( ) cancelButton% = True Filel. Refresh End Sub Private SUD cmdClose_Clιc ( ) End End Sub Private Sub cmdPrmt_Click ( ) On Error GoTo prmtError Dim startPosS Dim endPos& Dim filePathS Dim fileNameS Dim allFilesToPrintS Dim tιffPages% cancelButton% = False totalProcessed% - 0 totalFιles% = 0 startPos - 1 If Filel. fileName = "" Then 'If no file selected, display message S abort choose a file.", 0, "No file selected." If Right (Filel. Path, 1) = "\" Then filePath = Filel. Path Else filePath = Filel. Path _ "\" End If numOfFιles% = Filel. ListCount ' determine number of files for percent display For x% = 0 To numOfFιles% - 1 " L totalFiles* & Printer. Print "" Printer. Print "" Printer . FontBold = True Printer. FontSize = 50 Printe . Print fileNameS Forml - 2 Printe . Print tiffPages 6 " page(s)" ' Printer. ine (0, 0) - (Printer . ScaleWidtn, C) Printer . ewPage For 1% = 0 To tιffPages% - 1 Printer . Print "" Printer . ScaleMode = vbTwips ImageManl . PrnHdc = Printer. hDC ImageManl . DstLeft = 0 ImageManl. DstTop = 0 ImageManl. DstRight = Printer . ScaleWidth ImageManl. DstBottom = Printer . ScaleHeight ImageManl . PageNumber = 1% ImageManl . Re resh percentDone% = (1% + 1) / (tiffPages* + 1) * 100 lblPagesDone. Caption = "Printing page " £ 1% + 1 & " of " & tιffPaαes £ ". ( " £ D ercentD one* £ "%)" ' DoEvents ImageManl . Printlmage Printer . ewPage DoEvents Next 1% Printer .EndDoc DoEvents If cancelButton% = True Then cancelButton% = False 'reset the cancel button Call buttonEnable Filel. efresh Printer . EndDoc Printer . KillDoc ImageManl .Picture = "" 'pnlPagesDone. FloodPercent = 0 ' reset the bar 'pnlPercentDone. FloodPercent = 0 ' reset the bar lblDocsDone. Caption = "" lblPagesDone. Caption = "" Exit Do End If Loop ImageManl. Picture = "" 'pnlPercentDone . FlooαPercent = 0 I lDociDone .Caption = "" lolPagesDone. Caption = "" Call buttonEnable Filel .Refresh printError : MsgBox "Error # " £ Str ( Err .Number ) £ " was generated." £ Chr(13) £ Err . Description, , "Error" , Err .HelpFile, Err . HelpContext Resume Next End Sub Private Sub Dιrl_Change ( ) Filel. Path = Dirl. Path End Sub Private Sub Drιvel_Change ( ) On Error Resume Next D rl. Path = Drivel. Drive End Sub Private Sub Form_Load ( ) Me. eft = (Screen. Width - Me. idth) / 2 Ke.Top = (Screen. Heignt - Me. Height) / 3 On Error Resume Next cancelButtonfc = False Enα Sub Forml Public Sub buttonDisable ( ) Filel. Enabled = False Dirl. Enabled « = False Drivel . Enabled = False cmdPrint . Enabled = False c dClose . Enabled = False End Sub Public Sub buttonEnable () Filel. Enabled = True Dirl. Enabled = True Drivel. Enabled = True cmdPrint . Enabled = True cmdClose. Enabled - True End Sub Paper Chaser Table Structure Court Information Disk Names Document Info List of Privileges Preferences Report Names Court Information Field Name Data Type Length Cause rr Text 250 Plaintiff Text 250 Defendant Text 250 Court Text 250 County Text 250 State Text 250 Title of Pleading Text 250 Disk Names Field Name Data Type Length DiskName Text 50 DOCNl Text 50 DOCN2 Text 50 Document Info Field Name Data Type Length 9 12 Beg Bates π Text 20 End Bates n Text 20 To Text 250 From Text 250 CCs Text 250 Descnption Mciiiύ 64,000 Marked Text 2 Offered Text 2 Admitted Text 2 Date Text 20 Tag l Text 2 Tag 2 Text 2 Tag 3 Text 2 Tag 4 Text 2 Tag 5 Text 2 Tag 6 Text 2 Tag 7 Text 2 Tag S Text 2 Tag 9 Text 2 Tag 10 Text 2 Tag i l Text 2 Tag 12 Text 2 Tag 13 Text 2 Tag 14 Text 2 Tag 15 Text 2 Tag 16 Text 2 Tag 17 Text 2 Tag 18 Text 2 Tag 19 Text 2 Tag 20 Text 2 Tag 21 Text 2 Tag 22 Text 2 Tag 23 Text 2 Tag 24 Text 2 Produced Text Comments Memo 64,000 Pnvilege Log Text 25 Revised By Text 3 Date Revised Date/Time Print Text 20 Exhibit # Number L Loonngg lIinteger (-2,147,483 648 to 2,147,483,647) E\t Text 6 6 Order of Display Number L Loonngg II:nteger 1-2,147 4 *Ϊ,6 S to 2,1<»7,4£3,647) Disposition Text 20 List of Privileges Field Name Data Type Length Privileges Text 25 Preferences Field Name Data Type Length Case Name View Screen Message Field 1 Text 50 Field 2 Text 50 Field 3 Text 50 Field 4 Text 50 Field 5 Text 50 Field 6 Text 50 Field 7 Text 50 Field 8 Text 50 Field 9 Text 50 Field 10 Text 50 Field 11 Text 50 Field 12 Text 50 Field 13 Text 50 Field 14 Text 50 Field 15 Text 50 Field 16 Text 50 Field 17 Text 50 Field 18 Text 50 Field 19 Text 50 Field 20 Text 50 Field 21 Text 50 Field 22 Text 50 Field 23 Text 50 Field 24 Text 50 ImagePath Text 100 IsysPath Text lϋυ DbPath 1 Text IOC Report Names Field Name Data Type Length Report 1 Text 50 Report 2 Text 50 Report 3 Text 50 Report 4 Text 50 Report 5 Text 50 Report 6 Text 50 Report 7 Text 50 Report 8 Text 50 Report 9 Text 50 Report 10 Text 50 Report 1 1 Text 50 Report 12 Text 50 Report 13 Text 50 Report 14 Text 50 Report 15 Text 50 Report 16 Text 50 Report 17 Text 50 Report 18 Text 50 Report 19 Text 50 Report 20 Text 50 Report 21 Text 50 Report 22 Text 50 Report 24 Text 50 Report 24 Text 50 frr.Autorna e - 1 'Adti ated Document Separator 'Copyright (c) 1996, Luke Spence Option Explicit Deflnt A-Z Private Declare Function GetPixel Lib "GDI" (ByVal hDC As Integer, ByVal x As Integer, ByVal Y A s Integer) As Long Dim lColori D m ιX% D m ιY% D n sFilenameS Dim PageCount% Dim ιCurrentPage% D m ιNewFιlesFιlename$ Dim ιNewFιlePageCount Dim ιNewFιleCurrentPage% Dim sValιdDιvιder$ Dim ιFιleNumber% Dim sNe FilenameS Private Sub cmdFιleOpen_Cl c ( ) On Error GoTo errorLoad Dim ιDocCount% ιDocCount% - 0 If txtDocNameNumber .Text = "" Then Exit Sub ιFιleNumber% = f mAutomate . xtDocNameNumber . Text lCurrentPage* = 0 frmAutomate . cdlFilename. filename = "*.tιf" frmAutomate . cdlFilename. InitDir = "c:\pictures\demo\" frmAutomate. cdlFilename. Action = 1 On Error Resume Next If frmAutomate. cdlFilename - "* tif" Then Ex t Sub Filel. Path = "c:\pictures\demo\" Filel. Visible = True frmAutomate. TIFF. ile = frmAutomate . cdlFilename . filename Call pagesTotal frmAutomate . lblNumOfPages .Caption = "Number Of Pages: " & ιPageCount% Do While ιCurrentPage% < ιPageCount% ιCurrentPage% = ιCurrentPage% - 1 frmAutomate . lblCurrentPage. Caption = "Current Page: " & ιCurrentPage% Call imageDisplay Call eκaminePage Pi lei 'efresn DoEvents If sValiαDiviαerS = "T" Then ιFιleNumber% = FileNumber? + 1 iDocCount* = ιDocCount% + 1 Else Call writeTIF End If Loop DocCountfc = ιDocCount% + 1 'reset everything nac< to origin;, status lblCurrentPage. Caption = "" lblNumOfPaqes . Caption •= "" ..xtDocNameNumoer . Text = "" txtDocNamePref x.Text = "" .T.dFileOpen. Enabled = False frmAutomate. TIFF. File = "" frmAutomate . TIFF. Repaint = True XsgBox " " & ιPageCcunt% & " pages were separated nto " & ιDocCount% & " documents.", 0, "D ocument Separt on Complete." errorLoad. reset everything bac< to original status IclCurrent Page. Capticr. = "" lblNumOfPages. CaDtior. = "" txtDocNameNumbe . Text = "" txtDocNamePrefix.Text = "" cxdFileOoen Enabled = False frmAutomiϋe - 2 frmAutomate. TIFF. File = "" frmAutomate. TIFF. Reoamt = True Private Sub examinePage ( ) Dim sColorCount$ Dim ιQuadrant% Dim ιWιdthSectιon% Dim ιHeιghtSectιon% Dim ι?ιxelCheck% Dim ιBlackCount% Dim ι hιteCount% Dim ιLargeX% Dim ιLargeY% Dim ιSmallX% Dim ιSmallY% ιWιdthΞectιon% = frmAutomate TIFF. BitmaDWidth / 8 ιHeιghtSectιon% = frmAutomate . TIFF.3ιtmaoneισnt / 8 frmAutomate.TIFF. Visiole = True frmAutomate. TIFF. BitmapDC = True For ιQuadrant% = 1 To 4 Select Case ιQuadrant% Case 1 ιSmallX% = ι ιdthΞectιon% * 1 ιSmallY% = ιHeιghtΞectιon% * 1 ιLargeX% = ιWιdthSectιon% * 3 ιLargeY% = ιHeιghtSectιon% * 3 Case 2 ιSmallX% = ιWιdthSectιon% * 5 ιSmallY% = ιHeιghtSectιon% * 1 ιLargeX% = ιWιdthSectιon% * 7 ιLargeY% = ιHeιghtSectιon% * 3 Case 3 ιSmallX% = ιWιdthSectιon% » 1 ιSmallY% = ιHeιgntSectιon% * 5 ιLargeX% = ιWιdthΞectιon% * 3 ιLargeY% = ιHeιghtSectιon% * 7 Case 4 ιΞmallX% = ι ιdthSectιon% * 5 SmallY% _LargeX% ιLargeY% = lheigntSect oni * 7 End Select For ι?ικelCheck% = 1 To 1000 ιX = In ( (ιLargeX - iSmallX* + 1) * Rnd + ιSmallX%) ιY% = Int ( (ιLargeY - ιSmallY% + 1) * Rnd + ιSmallY%) lColorS = GetPixel (TIFF. BitmapDC, X%, ιY%) If lColorS, = 0 Then ιBlackCount% = ι31ackCount% -r 1 Else ιWhιteCount% = ιWhιteCount% + 1 End If Select Case ιQuadrant% Case 1, 4 If ιWhιteCount% > 100 Then frmAutomate .TIFF. BitmapDC = False sValidDividerS = "F" End If Case 2, 3 If ιBlackCount% > 100 The- f mAutomate.TIFF. BitmapDC = Ealse sValιdDιvιder$ = "F" End Select ιBlackCount% = 0 frmAutomate - 3 ιWhιteCount% - 0 Next ιQuadrant% svdiidDivider* = "r" frmAutomate. TIFF. BitmapDC = False End Sub Private Sub Form_Load() frmAutomate. ScaleWidth = 600 frmAutomate. ScaleHeight = 450 frmAutomate .Tcp = (Screen .Height - rmAutomate. Height) / 2 frmAutomate. Left = (Screen . Wiαth - rmAutomate .Width) / 2 lblCurrentPage. Caption = "" lblNumOfPages .Caption = "" Randomize End Sub Private Sub imageDisplay ( ) frmAutomate. TIFF. FilePage = ιCurrentPage% frmAutomate. TIFF. File = frmAutomate . cαlFilename filename frmAutomate. TIFF. Im geWidth = rmAutomate . TIFF. Width frmAutomate. TIFF. ImageHeight = f mAutomate. IFF. Height frmAutomate. TIFF. epaint = True End Sub Private Sub pagesTotalf) frmAutomate. TIFF. InfoPage = 32767 frmAutomate. TIFF. InfoFile = frmAutomate . cdlFilename . filename ιPageCount% = TIFF. InfoPage End Sub Private Sub txtDocNameNumber_Change ( ) cmdFileOpen. Enabled = True End Sub Private Sub writeTIFO frmAutomate. TIFF. FilePage = ιCurrentPage% frmAutomate. TIFF. SaveMulti = True frmAutomate. TIFF. SaveFormat = LVB_FILE_CCITT_GRO0P4 frmAutomate. TIFF.SaveFile = txtDocNamePrefix. Text & "-" s ιFιleNu ber% 5 ".tif End Sub frmAutomate - 1 VERSION 5.00 Begin VB.Form frmAutomate Appearance = 0 'Hat AutoRedraw = -1 'True BackColor = SH00808000& Caption = "Automated Document Separator ClientHeight = 6105 ClientLeft = 1800 ClientTop = 720 ClientWidth = 6225 BegmProperty Font Name "MS Sans Serif" Size 8.25 Charset 0 Weight 700 Underline 0 'False Italic 0 'False Ξtπkethrough 0 'False ΞndProperty ForeColor = &H80000008& Icon = (Icon) LmkTopic = "Forml" MaκButton = 0 'False PaletteMode => 1 'UseZOrder ScaleHeight = 407 ScaleMode = 3 'Pixel ScaleWidth = 415 3egm VB.FileListBox Filel Appearance 0 'Flat BackColor &H00808000& ForeColor -H00FFFFFFS, Height 5880 Left 4560 Tablndex 8 Top 120 Visible 0 'False Width 1455 End Begin VB.TextBox txtDocNamePrefix A.ppearance 0 'Flat BackColor SH00808000S Heignt 235 Left 1800 Tablndex 5 Top 5400 Width 615 End Begin VB.TextBox txtDocNameNumber Appearance 0 ' Flat BackColor 4H00808000& Heiσht 285 Left 1800 Tablnαex 4 Tc-o 5760 iαtn 615 End Begin V3.?ιctureBo: K cdlFilename Appearance 0 'Flat BackColor SH80000005& ForeColor &H80000008& Height 480 Left 0 Scaleneight 450 ScaleWidth 1170 Tablncex 9 Top 2400 Width 1200 End 3egιn V3. PictureBox TIFF frmAutomate - 2 Appearance 0 .'lat BackColor &H00C0C0C0& ForeColor &HS00UUUU&& Height 4575 Left 240 ScaleHeight 4545 ScaleWidth 4065 Tablndex 1 Top 600 Width 4095 End Begin VB.CommandButton cmdFileOpen Appearance 0 'Flat Caption "Open File" Enabled 0 ' alse Height 375 Left 2640 Tablndex 0 Top 5520 Width 1095 End Begin VB. Label IblDocNameNumber Appearance 0 'Flat BackColor &H00808000S Caption "Start Number: 1 ForeColor -H80000008& Height 255 Left 480 Tablndex 7 Top 5760 Width 1215 End Begin VB. Label IblDocNamePrefix Appearance 0 'Flat BackColor SH00808000S Caption "Prefix: " ForeColor SH80000008S Height 255 Left 1080 Tablndex 6 Top 5400 Width 615 End Begin VB. abel lblCurrentPage Appearance 0 'Flat BackColor -H00808000. ForeColor &H8O000008& Height 255 Left 2400 Tablndex 3 Top 120 Width 2175 End Begin VB . Lauel lbl N-imOf Paσes Appearance 0 'Flat BackColor &H00808000S, ForeColor &H80000008& Height 255 Left 120 Tablndex 2 Top 120 Width 2175 End End

Claims: CLAIMS WHAT IS CLAIMED IS: 1. A method for interpreting a computer file including a plurality of pages, said method comprising: (a) selecting a portion of a page; (b) comparing said portion with a document separator template; and (c) identifying a predefined image in said computer file. 2. The method of claim 1 wherein each page includes a plurality of pixel values and step (a) includes selecting a subset of the pixel values of a page. 3. The method of claim 2 wherein step (b) includes comparing the pixel values of said subset with corresponding pixel values in said document separator template. 4. The method of claim 3 wherein said document separator template includes a first area pixel of values and a second area of pixel values, wherein the first area pixel values comprise a different value than the second area pixel values. 5. The method of claim 4 wherein step (c) includes determining whether the pixel values of said subset are substantially similar to the corresponding pixel values of said document separator template. 6. The method of claim 5 further identifying a page in said computer file as a document separator page when said pixel values of said subset are substantially similar to the corresponding pixel values of said document separator template. 7. A computer readable storage medium for storing an executable set of software instructions which, when inserted into a host computer system, is capable of controlling the operation of the host computer, said software instructions being operable to identify the existence of a predefined image in a computer file including a plurality of pages, said software instructions including: means for selecting a portion of a page; means for comparing said portion of a page with a document separator template; and means for identifying a predefined image in said computer file. 8. The invention of claim 7 wherein each page includes a plurality of pixel values and said means for selecting a portion of a page includes a means for selecting a subset of the pixel values of said page. 9. The invention of claim 8 wherein said means for comparing said portion of a page with a document separator template includes a means for comparing the pixel values of said subset with corresponding pixel values in said document separator template. 10. The invention of claim 9 wherein said document separator template includes a first area pixel values and a second area of pixel values, wherein the first area pixel values comprise a different value than the second area pixel values. 11. The invention of claim 10 wherein said means for identifying a predefined image includes a means for determining whether the pixel values of said subset are substantially similar to the corresponding pixel values of said document separator template. 12. The invention of claim 11 wherein said means for identifying a page in said computer file as a document separator page includes a means for identifying a page as a document separator page when said pixel values of said subset are substantially similar to the corresponding pixel values of said document separator template. 13. A user-configurable document management system, comprising: a computer including a display and an input device; a scanner coupled to said computer; and a printer coupled to said computer; wherein said computer includes document management software including: an image viewer; a search engine; a briefing tool; a transcript viewer; and an installation module permitting a user to configure said software to include any desired image viewer, search engine, briefing tool, and transcript viewer. 14. The document management system of claim 13 wherein said briefing tool is adapted to generate a window on said display that remains viewable in its entirety until terminated by user intervention. 15. The document management system of claim 13 wherein said transcript viewer interprets transcript files in a variety of formats and automatically determines which format is associated each transcript file. 16. The document management system of claim 15 wherein said transcript viewer further adapts each transcript file to be processed by said document management software. 17. A method for installing software comprising a plurality of modules in a computer system, comprising: (a) recognizing the existence of installable modules; (b) installing said installable modules. 18. A method for generating a document database, comprising: (a) reading a look-up table; (b) scanning a document; and (c) storing said document in said document database at a location determined by said look-up table.

Inventors: SALTSMAN MICHAEL L, SPENCE LUKE A, SALTSMAN, MICHAEL, L., SPENCE, LUKE, A.
Applicants: SALTSMAN MICHAEL L, SPENCE LUKE A, TEMPEST SOFTWARE INC, SALTSMAN, MICHAEL, L., SPENCE, LUKE, A., TEMPEST SOFTWARE INCORPORATED
Application year: 1997
Main classification: G06F17
IPC codes: G06F17