Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / January 2006

Tip: Looking for answers? Try searching our database.

How to automate PaperPort?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
deko - 04 Jan 2006 05:12 GMT
I've noticed the half dozen or so object libraries in the References list
for PaperPort and thought I would try to automate the PaperPort 9
application.  The goal is to click a button and initiate a scan of a
document into a pdf file, programmatically name the file, and move it to a
particular folder.  The problem is I have no documentation other than the
Object Browser.

When trying to connect to the scanner, I do this:

   Dim ppCnx As ScannerConnection
   Set ppCnx = New ScannerConnection

But before I go any further, I apparently need to register the client
(whatever that means).

If I try this:

   Debug.Print ppCnx.ScannerConnected

I get a Visual Basic Run-time error:

   "PaperPort error.  The client called the Scanner manager before being
properly registered..."

Looking at the RegisterClient event in Object Browser, I see it takes 2
arguments:

   Sub RegisterClient(clientName As String, clientWindow As Long)

So I think I need something like this:

   ppCnx.RegisterClient("strClientName", lngClientWindow)

But what to use for clientName and clientWindow??

Any suggestions welcome.  And if anyone can point me to PaperPort automation
sample code that would be great.

Thanks in advance.

Here are the libraries I'm trying to use:

Library: "PaperPortApplicationLib"
C:\Program Files\ScanSoft\PaperPort\PaprPort.exe

Library: "PaperPortFolderLib"
C:\Program Files\ScanSoft\PaperPort\PPFolder.dll

Library: "PaperPortScannerConnectionLib"
C:\Program Files\ScanSoft\PaperPort\ppscanmg.exe
Tom van Stiphout - 04 Jan 2006 14:15 GMT
In a similar situation we decided to have the user initiate the
scanning in Paperport, play (stack, rotate) with the images until
satisfied, and then come to our form to index them. We enumerate the
PDF files in the folder, and upon save, we move each file to a server
location. As they are moved, they conveniently disappear from the
Paperport work surface.

-Tom.

>I've noticed the half dozen or so object libraries in the References list
>for PaperPort and thought I would try to automate the PaperPort 9
[quoted text clipped - 46 lines]
>Library: "PaperPortScannerConnectionLib"
>C:\Program Files\ScanSoft\PaperPort\ppscanmg.exe
deko - 04 Jan 2006 21:20 GMT
> In a similar situation we decided to have the user initiate the
> scanning in Paperport, play (stack, rotate) with the images until
> satisfied, and then come to our form to index them. We enumerate the
> PDF files in the folder, and upon save, we move each file to a server
> location. As they are moved, they conveniently disappear from the
> Paperport work surface.

I suppose the scripting runtime could be used to rename/move the newly
scanned files, and I could get the path like this:

   Dim ppApp As PaperPortApplication
   Dim ppFldr As PaperPortDiskFolder
   Set ppApp = New PaperPortApplication
   Set ppFldr = ppApp.DisplayedDesktopFolder
   Debug.Print ppFldr.Path

But most documents are one-page invoices.  It shouldn't be too difficult to
automate, if I could just get a connection to the scanner:

   Dim lngClientWindow As Long
   Dim strClientName As String
   Dim ppCnx As ScannerConnection
   Set ppCnx = New ScannerConnection
   ppCnx.RegisterClient strClientName, lngClientWindow

But what is clientName and clientWindow?
And with whom or what am I registering these things with?
deko - 04 Jan 2006 21:50 GMT
I found an interesting debug program:

C:\Program Files\ScanSoft\PaperPort\ppdebug.exe

If I have ppdebug running when I open PaperPort, I get this output:

   PAPRPORT:  Creating scanner connection.
   PAPRPORT:  Scanner connection created.
   PAPRPORT:  Connected scanner connection sink.
   PAPRPORT:  Turned receive scans on
   PAPRPORT:  Registered client.

Interestingly, I get the same output when running my automation code, except
the automation code results in a nasty Run-time error because I don't know
what to do with this method:

Sub RegisterClient(clientName As String, clientWindow As Long)

I can only guess that the clientName is the path to the executable and the
clientWindow is the handle for the app window.  But if I am trying to do
this via automation, what to use for a window handle?  The Access app window
handle?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.