Saves a document on the application server.
SaveDocumentEx also saves a document, and provides additional options to specify the document’s content type and privacy flag. |
<HsvReports>.SaveDocument bstrPath, bstrName, bstrDescription, lDocumentType, lDocumentFileType, lSecurityClass, varabyDocument, vbOverwriteExisting
String (ByVal). The path of the folder containing the documents. The folders in the path are delimited by backslashes ( \ ). | |
Long (ByVal). The document type. Valid values are represented by the HFMConstants type library constants listed in Document Type Constants. | |
Long (ByVal). The file type of the document. Valid values are represented by the HFMConstants type library constants listed in Document File Type Constants. | |
Long (ByVal). The ID of the document’s security class. You can get the ID from a security class name with GetSecurityClassID. | |
Byte array (ByVal). The document’s definition as an array of Bytes. | |
Boolean (ByVal). Determines whether to overwrite a document of the same name on the application server. Pass TRUE to overwrite existing documents, FALSE otherwise. |
The following subroutine saves the specified journal report in the .RPT format. Note that the subroutine uses HsvSecurityAccess.GetSecurityClassID to get the ID of the security class that is passed.
Sub saveJournalRpt(sPath As String, sName As String, _ sDesc As String, sSecClass As String, baDoc() As Byte) Dim cSecurityAccess As HsvSecurityAccess, lSecID As Long 'm_cSession is an HsvSecurityAccess object reference Set cSecurityAccess = m_cSession.Security 'm_cReports is an HsvReports object reference cSecurityAccess.GetSecurityClassID sSecClass, lSecID m_cReports.SaveDocument sPath, sName, sDesc, _ WEBOM_DOCTYPE_RPTJOURNAL, WEBOM_DOCFILETYPE_RPTDEF, lSecID, _ baDoc, True End Sub