GetDocument

Returns a string containing the content of the specified document, as well as strings containing the document’s description and security class.

Tip:

SaveDocument and SaveDocumentEx create a document from a string.

Syntax

<HFMwManageDocuments>.GetDocument (bstrPath, bstrName, lDocumentType, lDocumentFileType, pvarbstrDescription, pvarbstrSecurityClass)

Argument

Description

bstrPath

The document repository folder that contains the document.

Input argument. String subtype.

bstrName

The name of the document.

Input argument. String subtype.

lDocumentType

The document type of the document. 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 document. File types are represented by the HFMConstants type library constants listed in Document File Type Constants.

Input argument. Long subtype.

pvarbstrDescription

Returns the description of the document.

Output argument.

pvarbstrSecurityClass

Returns the label of the document’s security class.

Output argument.

Return Value

Returns a string that contains the content of the document.

Example

The following function saves the content of the specified data form to disk.

Function saveWebFormToDisk(sDocFolder, sFormName)
Dim cHFMDocuments, sText, sDesc, sSecClass, oFs, oTs
Set cHFMDocuments = _ 
Server.CreateObject("Hyperion.HFMwManageDocuments")
cHFMDocuments.SetWebSession cHFMSession
sText = cHFMDocuments.GetDocument(sDocFolder, sFormName, _ 
WEBOM_DOCTYPE_WEBFORM, WEBOM_DOCFILETYPE_FORMDEF, sDesc, _ 
sSecClass)
' Write the string to disk as a text file
set oFs = CreateObject("Scripting.FileSystemObject")
set oTs = oFs.CreateTextFile("c:\temp\" & sFormName & ".txt")
oTs.Write(sText)
oTs.Close
End Function