SaveDocument2

Saves a document in the document repository and specifies the document’s content type and privacy flag, given an array of bytes that defines the content of the document to be created. This method can also save a custom binary document.

Syntax

<HFMwManageDocuments>.SaveDocument2 bstrPath, bstrName, bstrDescription, lDocumentType, lDocumentFileType, bstrSecurityClass, varabyContents, vbIsPrivate, lContentType, vbOverwriteExisting

Argument

Description

bstrPath

The document repository folder that will contain the document.

Input argument. String subtype.

bstrName

The name of the document.

Input argument. String subtype.

bstrDescription

The description 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.

If the document is a data form, this method also validates the document’s definition.

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.

bstrSecurityClass

The name of the security class for the document.

Input argument. String subtype.

varabyContents

The document’s contents as an array of bytes. Anything other than an array of bytes will throw an error.

Input argument.

vbIsPrivate

Specifies whether the folder is public or private. Pass TRUE for private, FALSE for public.

Input argument. Boolean subtype.

lContentType

The type of documents that the folder can store, if you are saving a folder. If are saving a document type other than a folder, you can pass any Long, as SaveDocumentEx will ignore this argument’s value in that case.

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

Input argument. Long subtype.

vbOverwriteExisting

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

Input argument. Boolean subtype.