DeleteDocuments

Deletes the specified documents from the document repository.

The paths, names, document types, and file types that identify the documents to be deleted are passed in arrays that have a one-to-one correspondence with each other.

Syntax

<HFMwManageDocuments>.DeleteDocuments varabstrPaths, varabstrNames, lDocumentType, lDocumentFileType, vbIncludeSubFolders

Argument

Description

varabstrPaths

An array of the document repository folders that contain the documents to be deleted. Each array item should contain the full path to the applicable folder.

Input argument.

varabstrNames

An array of the names of the documents to be deleted.

Input argument.

lDocumentType

An array of the document types for the documents to be deleted. Document types are represented by the HFMConstants type library constants listed in Document Type Constants.

Input argument. Long subtype.

lDocumentFileType

An array of the file types for the documents to be deleted. File types are represented by the HFMConstants type library constants listed in Document File Type Constants.

Input argument. Long subtype.

vbIncludeSubFolders

Future use. You must pass a valid Boolean, but the value is ignored by this method.

Input argument.

Example

The following subroutine deletes all data forms in the specified document repository folder. EnumDocuments returns the names of the forms in the folder, and then these names are passed to DeleteDocuments.

Sub DeleteFormsFromfolder(sPath)
Dim cHFMDocuments, vaDocNames, vaDescs, vaTime, vaSecClass
Dim vaPaths
Set cHFMDocuments = Server.CreateObject("Hyperion.HFMwManageDocuments")
'g_cHFMSession is an HFMwSession object reference
cHFMDocuments.SetWebSession g_cHFMSession
vaDocNames = cHFMDocuments.EnumDocuments (sPath, _ 
  WEBOM_DOCTYPE_WEBFORM, WEBOM_DOCFILETYPE_FORMDEF, _ 
  FALSE, FALSE, 0, 0, vaDescs, vaTime, vaSecClass)
' Create array of paths to pass to DeleteDocuments
ReDim vaPaths(uBound(vaDocNames))
For i = 0 To uBound(vaDocNames)
  vaPaths(i) = sPath
Next
For i = 0 To uBound(vaDocNames)
  cHFMDocuments.DeleteDocuments vaPaths, vaDocNames, _ 
    WEBOM_DOCTYPE_WEBFORM, WEBOM_DOCFILETYPE_FORMDEF, FALSE
Next
End Sub