DocFileName
This read-only property returns the full pathname of a document (image or text file) from which the workdoc is built.
Syntax
DocFileName (index as Long) as String
Parameter | Description |
---|---|
Index | The index parameter.
Possible values 0 to DocFileCount-1 |
Sample Code
If a workdoc was created from a single document, such as a multi-TIFF file, you can get the name of the document file by accessing the 0 index.
Path = pWorkdoc.DocFileName(0)
The script function below returns the TIF file creation date.
Public Function fnGetFileDate(pWorkdoc as SCBCdrPROJLib.SCBCdrWorkdoc) as String
Dim FSO as New Scripting.FileSystemObject
Dim oFile as Scripting.File
Dim strFileName as String
Dim dtCreated as Date
strFileName = Replace(pWorkdoc.DocFileName(0),".wdc",".tif")
If FSO.FileExists(strFileName) Then
Set oFile = FSO.GetFile(strFileName)
dtCreated = oFile.DateCreated
fnGetFileDate = Month(dtCreated) & "/" & Day(dtCreated) & "/" & Year(dtCreated)
End If
Set FSO = Nothing
Set oFile = Nothing
End Function