Pcdgetdoc – Kofax DM API User Manual
Page 73

DM API O
BJECTS
53
PCDGetDoc
Example
The following example shows you can use PCDGetDoc to retrieve the
name of a file that contains a document in your DM repository.
.
.
.
Dim objGetDoc As New PCDGetDoc
objGetDoc.
strDST
objGetDoc.
_
"%TARGET_LIBRARY", strLib
objGetDoc.
_
"%DOCUMENT_NUMBER", strDocNum
objGetDoc.
_
"%VERSION_ID", strVersionID
objGetDoc.
If objGetDoc.
<> 0 Then
'Error occurred.
End If
Dim lngRowCount As Long
Dim strFileName As String
'Dim bdata() As Byte
'Dim indata As Variant
lngRowCount = objGetDoc.
If objGetDoc.
<> 0 Then
'Error occurred.
End If
If lngRowCount <> 1 Then
'Possible Error. Only 1 file expected.
Else
objGetDoc.
( 1 )
strFileName = objGetDoc.
( _
PATH )
MsgBox “The name of the document is: “ & _
strFileName
EndIf
.