Document objects, Dm a – Kofax DM API User Manual

Page 47

Advertising
background image

T

HE

DM A

RCHITECTURE

27

Document Objects

lngENum = PDoc.ErrNumber

If lngENum <> 0 Then

Dim strEDesc As String, strENum As String

strEDesc = PDoc.ErrDescription

strENum = CStr( lngENum )

MsgBox "Error " & strENum & ": " & strEDesc

'Handle the error...

End If

PDoc.Update

'Check for error.

Dim lngENum As Long

lngENum = PDoc.ErrNumber

If lngENum <> 0 Then

Dim strEDesc As String, strENum As String

strEDesc = PDoc.ErrDescription

strENum = CStr( lngENum )

MsgBox "Error " & strENum & ": " & strEDesc

'Handle the error...

End If

Set PDoc = Nothing

MsgBox "Trustee " & cboTrustees.Text & _

" has been added."

Exit Sub

'2) Add trustee to the trustees collection

' and update trustees.

PDoc.FetchTrustees

TrusteeList.AddTrustee cboTrustees.Text, _

2, Val(txtRights)

PDoc.SetTrustees TrusteeList

PDoc.UpdateTrustees

'Check for error.

Dim lngENum As Long

lngENum = PDoc.ErrNumber

If lngENum <> 0 Then

Dim strEDesc As String, strENum As String

strEDesc = PDoc.ErrDescription

strENum = CStr( lngENum )

MsgBox "Error " & strENum & ": " & strEDesc

'Handle the error...

End If

Advertising