EnumDocuments

Returns the names, descriptions, timestamps, and security class IDs of documents that meet the search criteria.

This information is returned in arrays that have a one-to-one correspondence.

Tip:

EnumDocumentsEx is a similar method that returns additional information such as the documents’ owners and document types. EnumDocumentsEx also enables you to filter for public or private documents.

Syntax

<HsvReports>.EnumDocuments(bstrPath, lDocumentType, lDocumentFileType, vbFilterByCurrentUserOnly, vbFilterByCreateTime, dStartTime, dStopTime, pvarabstrDescriptions, pvaradTimestamp, pvaralSecurityClass)

Argument

Description

bstrPath

String (ByVal). The path of the folder containing the documents. The folders in the path are delimited by backslashes ( \ ).

lDocumentType

Long (ByVal). Identifies the type of document to return. Valid values are represented by the HFMConstants type library constants listed in Document Type Constants.

lDocumentFileType

Long (ByVal). Identifies the file types of the documents to return. Valid values are represented by the HFMConstants type library constants listed in Document File Type Constants.

vbFilterByCurrentUserOnly

Boolean (ByVal). Determines whether only documents created by the connected user are returned. Pass TRUE to return only documents created by the connected user, FALSE otherwise.

vbFilterByCreateTime

Boolean (ByVal). For internal use.

dStartTime

Double (ByVal). For internal use.

dStopTime

Double (ByVal). For internal use.

pvarabstrDescriptions

Variant array. Returns the descriptions of the documents.

The array is returned as a String subtype.

pvaradTimestamp

Variant array. Returns the timestamps of the documents.

The array is returned as a Double subtype; the array elements are formatted so that they can be cast to the Date data type.

pvaralSecurityClass

Variant array. Returns the documents’ security class IDs.

The array is returned as a Long subtype.

Return Value

Variant array. Returns the names of the documents that match the search criteria. The array is returned as a String subtype.

Example

The following function returns the names of all data forms in a given folder.

Function getWebFormNames(sPath As String) As Variant
Dim vaRet, vaDescs, vaTimes, vaSec
'm_cReports is an HsvReports object reference
vaRet = m_cReports.EnumDocuments(sPath, WEBOM_DOCTYPE_WEBFORM, _
   WEBOM_DOCFILETYPE_FORMDEF, False, False, 0, 0, vaDescs, _
   vaTimes, vaSec)
getWebFormNames = vaRet
End Function