com >> What is clientName and clientWindow in automation code?

by deko » Wed, 04 Jan 2006 15:54:24 GMT

I'm trying to automate the PaperPort 9 application so I can acquire scanned
images and documents from an Access application.

The goal is to click a button and initiate a scan of a
document into a pdf file, then programmatically name the file and move it to
a
particular folder. The problem is I have no documentation other than the
Object Browser (in the Access VBA Editor).

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

Dim ppCnx As ScannerConnection
Set ppCnx = New ScannerConnection

But I 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 is clientName and clientWindow??

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

Thanks in advance.



Similar Threads

1. Find clientname

Hi,

Hope anyone can help. I developping a tool for administration. What I need
is when a user calls, and give me a username, then I though my application
type in that username and find witch computers the user is loged on to. I'v
tried a dosin things, WMI, ADSI but it seems that I have to get this
information from our DC's, but how do I read this information in the DC's.

As right now, I'm using a log-fil that are createt when the user logs on, to
get this information, but would like to get it another way.

I'm using VB6 Enterprise.

Best regrads

/Tony


2. Convert VB Automation code into VC++ code

3. I am new to VBA and am stuck

4. How can I reffer to an access table when I am coding in VB - Access Forms Programming

5. I am using a Sub Mail_ActiveSheet_Outlook() code in VB

I am using a VB code in Excel that copies an excel sheet from a workbook, 
saves it to another worksheet and then sends it via Outlook.  I would like to 
add another attachment of an rtf file but have been unsuccessful in doing so. 
 See code below:


Sub Mail_ActiveSheet_Outlook()
'
' Mail_ActiveSheet_Outlook()
' Macro recorded 3/8/2006 by United Parcel Service
'
'You must add a reference to the Microsoft outlook Library
    Dim OutApp As Outlook.Application
    Dim OutMail As Outlook.MailItem
    Dim wb As Workbook
    Dim strdate As String
    strdate = Format(Now, "dd-mm-yy h-mm-ss")
    Application.ScreenUpdating = False
    Sheets("Daily Carrier Info - Yard").Copy
    Set wb = ActiveWorkbook
    With wb
        .SaveAs "Yard Status " & ThisWorkbook.Name _
              & " " & strdate & ".xls"
        Set OutApp = CreateObject("Outlook.Application")
        Set OutMail = OutApp.CreateItem(olMailItem)
        With OutMail
            .To = " XXXX@XXXXX.COM "
            .CC = ""
            .BCC = ""
            .Subject = "Outbound FTC91102"
            .Body = "Please see today's attached Full Outbound and Yard 
Status reports."
            .Attachments.Add wb.FullName
            'You can add other files also like this
            '.Attachments.Add ("\\usagatla01s1002\Sear_K Mrt 
Share\Sears-Kmart\Daily Reporting\rptFullOutbound.rtf")
            .Send   'or use .Display
        End With
        .ChangeFileAccess xlReadOnly
        Kill .FullName
        .Close False
    End With
    Application.ScreenUpdating = True
    Set OutMail = Nothing
    Set OutApp = Nothing
End Sub

The section (.Attachments.Add wb.FullName) I would think should be as 
follows but it doesn't work.

.Attachments.Add rtf.("\\usagatla01s1002\Sear_K Mrt Share\Sears-Kmart\Daily 
Reporting\rptFullOutbound.rtf")

Is this possible to do???

Thanks.



6. Am I asking to much from vb codes? - Excel Functions&Formulas

7. I am looking for an HTA exit code function like wscript.quit()

I have moved to using HTA scripts but I can't figure out how to send an exit 
code back to the calling app. In vbscript I was able to do this with wscript.
quit(code). This function will not work in HTA. Is there a way to pass the 
exit code back from an HTA?

Thanks

8. I am dead with ado rs.Find("Code Like 'E*')