473,408 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to automate PaperPort?

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
3 6159
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
> 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kate Gibbs | last post by:
I need to write a simple utility in VB.NET that reads an Excel file, gets some data from a sheet, then...it needs to automate internet explorer in a robot manner. I know that Application Centre...
3
by: Brad Burke | last post by:
From a windows .Net app, I need to 1) check if MSAccess is already open to a certain Access application. If so, then open a form and find a certain record. 2) If not open, then open MSAccess and...
4
by: Chris via AccessMonster.com | last post by:
I have the challenge of needing to automate table creation. It doesn't end there the tables have to be created from one table that looks something like this... Email ...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
2
by: Phil Latio | last post by:
We have despatch process which kicks out picking information into text files at hourly intervals. The text files are named sequentially by process; 'ABC.txt', 'ABC01.txt', 'ABC02.txt' for one...
11
by: gert365 | last post by:
I'm working on a scirpt to be used on a windows machine and I need to automate a user's input on the command prompt. For example I'm using os.system('mycommand') to excute the commands I want. ...
1
by: imburgiadom | last post by:
From a Microsoft Access form command button, I want to launch paperport and open a selected pdf file automatically. I have associated pdf files with paperport 11. The VBA code that I use...
9
by: Ots | last post by:
I'm using SQL 2000, which is integrated with a VB.NET 2003 app. I have an Audit trigger that logs changes to tables. I want to apply this trigger to many different tables. It's the same trigger,...
2
by: =?Utf-8?B?QWxleGFuZGVyIFd5a2Vs?= | last post by:
Is it possible to automate a COM object ebmeded in an excel document run the process and return the results in a C# .NET application? Or better yet extract the com object some how and just run it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.