LoadDocuments

Loads one or more documents from disk into the specified document repository folder, applying the same security class to all of the documents.

Tip:

To apply different security classes to loaded documents or flag them as private, use LoadDocumentsEx.

Syntax

<HFMwManageDocuments>.LoadDocuments bstrDestinationPath, lDocumentType, lDocumentFileType, bstrSecurityClass, varabstrFilePaths, bstrLogFilePath, vbIncludeSubFolders, vbOverwriteExisting

Argument

Description

bstrDestinationPath

The document repository folder that will contain the documents. Precede the folder name with a backslash ( \ ).

Input argument. String subtype.

lDocumentType

The document type of the documents. Document types are represented by the HFMConstants type library constants listed in Document Type Constants.

Input argument. Long subtype.

lDocumentFileType

The file type of the documents. File types are represented by the HFMConstants type library constants listed in Document File Type Constants.

Input argument. Long subtype.

bstrSecurityClass

The security class for the documents.

Input argument. String subtype.

varabstrFilePaths

An array of strings that contain the names and file system paths of the documents to be loaded.

Input argument.

bstrLogFilePath

The name and path of the log file for the load operation. You must specify a name and path, otherwise an error occurs.

Input argument. String subtype.

vbIncludeSubFolders

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

Input argument.

vbOverwriteExisting

Indicates whether existing documents of the same name should be overwritten. Pass TRUE to overwrite, FALSE otherwise.

Input argument.

Example

The following example loads three data forms into a document repository folder named Sales.

Dim cHFMDocuments, saDocs(2)
Set cHFMDocuments = _ 
Server.CreateObject("Hyperion.HFMwManageDocuments")
' cHFMSession is a previously set HFMwSession object
cHFMDocuments.SetWebSession cHFMSession
' Populate an array with the form names and paths
saDocs(0) = "C:\Acme\WebForms\Demo1.wdf"
saDocs(1) = "C:\Acme\WebForms\DemoList1.wdf"
saDocs(2) = "C:\Acme\WebForms\DemoList2.wdf"
cHFMDocuments.LoadDocuments "\Sales", WEBOM_DOCTYPE_WEBFORM, _ 
WEBOM_DOCFILETYPE_FORMDEF, "[Default]", saDocs, _ 
 "C:\Acme\WebForms\webformload.log", FALSE, TRUE