GetFileSizeKB
This method returns the file size of an image or document through a custom script.
Syntax
GetFileSizeKB(pWorkdoc as SCBCdrWorkdoc) as Integer
Sample Code
Private Function GetFileSizeKB(pWorkdoc as SCBCdrWorkdoc) as Integer
Dim FSO as FileSystemObject
Dim ImageFile as File
On Error GoTo ErrHandler
Set FSO = New FileSystemObject
Set ImageFile = FSO.GetFile(pWorkdoc.DocFileName(0))
GetFileSizeKB = Round(ImageFile.Size/1024)
Exit Function
ErrHandler:
GetFileSizeKB = -1
End Function