By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

How to automate PaperPort?

P: n/a
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

Jan 4 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Tue, 3 Jan 2006 21:12:24 -0800, "deko" <de**@nospam.com> wrote:

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
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


Jan 4 '06 #2

P: n/a
> 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?

Jan 4 '06 #3

P: n/a
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?
Jan 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.