beautypg.com

Pcdputdoc, 100 c – Kofax DM API User Manual

Page 120

background image

100 C

HAPTER

3

PCDPutDoc

Else

TotalFileSize = TotalBytesWritten

End If

Get #1, , bdata

objPutStream.Write bdata, TotalBytesWritten

Debug.Print TotalBytesWritten, _

objPutStream.BytesWritten, _

objPutStream.ErrNumber, _

objPutStream.ErrDescription

TotalBytesWritten = TotalFileSize - _

TotalBytesWritten

End If

Wend

objPutStream.SetComplete

Close #1

Set objPutSteam = Nothing

Set objDoc = Nothing

Set objDoc = New PCDDocObject

objDoc.SetDST DST

objDoc.SetObjectType “DEF_PROF”

objDoc.SetProperty "%TARGET_LIBRARY", Library

objDoc.SetProperty "%OBJECT_IDENTIFIER", _

DocNumber

objDoc.SetProperty "%VERSION_ID", VersionID

objDoc.SetProperty "%STATUS", "%UNLOCK"

objDoc.Update

If objDoc.ErrNumber <> 0 Then

Debug.Print objDoc.ErrNumber, _

objDoc.ErrDescription

End If

Set objPutDoc = Nothing

Set objDoc = Nothing

Debug.Print "Upload completed!"

End Sub