EnumDocumentsEx

Returns the names, descriptions, timestamps, security class IDs, privacy flags, folder content types, owners, file types, and document types of documents that meet the search criteria. You can also filter for public or private documents.

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

Tip:

EnumDocuments is a similar method that returns only the documents’ names, descriptions, timestamps, and security classes.

Syntax

<HsvReports>.EnumDocumentsEx(bstrPath, varalDocumentType, varalDocumentFileType, vbFilterByCreateTime, dStartTime, dStopTime, lShowPrivateDocs, pvarabstrDescriptions, pvaradTimestamp, pvaralSecurityClass, pvarabIsPrivate, pvaralFolderContentType, pvarabstrDocOwner, pvaralFileType, pvaralReportType)

Argument

Description

bstrPath

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

varalDocumentType

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

varalDocumentFileType

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

vbFilterByCreateTime

Boolean (ByVal). For internal use.

dStartTime

Double (ByVal). For internal use.

dStopTime

Double (ByVal). For internal use.

lShowPrivateDocs

Long (ByVal). Specifies whether to return public documents, private documents, or both. Valid values are represented by the HFMConstants type library constants listed in Showing Public and Private Documents.

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.

pvarabIsPrivate

Variant array. Indicates whether the documents are flagged as public or private.

The array is returned as a Boolean subtype.

pvaralFolderContentType

Variant array. Returns an array indicating the types of documents that folders can contain. This value has meaning only for folders; ignore array items that correspond to document types other than folders.

Valid values for array items are represented by the HFMConstants type library constants listed in Document Type Constants.

The array is returned as a Long subtype.

pvarabstrDocOwner

Variant array. Returns an array containing the usernames of the documents’ owners.

The array is returned as a String subtype.

pvaralFileType

Variant array. Returns an array of the documents’ file types. File types are represented by the HFMConstants type library constants listed in Document File Type Constants.

The array is returned as a Long subtype.

pvaralReportType

Variant array. Returns an array of the documents’ document types. Document types are represented by the HFMConstants type library constants listed in Document Type Constants.

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 a two-dimensional array containing the names and owners of the public data form in a given folder.

Function getPubWebFormNamesOwners(sPath As String) As Variant
Dim vaNames, vaDescs, vaTimes, vaSec, vaPrivate, vaContent
Dim vaOwners, vaFileType, vaReportType, vaRet()
'm_cReports is an HsvReports object reference
vaNames = m_cReports.EnumDocumentsEx(sPath, _
   WEBOM_DOCTYPE_WEBFORM, WEBOM_DOCFILETYPE_FORMDEF, False, 0, _ 
   0, ENUMSHOWPRIVATEDOCS_DONTSHOW, vaDescs, vaTimes, vaSec, _ 
   vaPrivate, vaContent, vaOwners, vaFileType, vaReportType) 
ReDim vaRet(UBound(vaNames), 1)
For i = LBound(vaNames) To UBound(vaNames)
   vaRet(i, 0) = vaNames(i)
   vaRet(i, 1) = vaOwners(i)
Next
getPubWebFormNamesOwners = vaRet
End Function