Framework EDI Reference. Methods and Properties
ediFile. ZipToFile

Compresses the contents of the file to a target file.

Syntax:

Parameters:

Returns

Returns 1 if the operation is successful; otherwise the operation returns zero.

 

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oFileSystem As Fredi.ediFileSystem
Dim oFile As Fredi.ediFile

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get file system object.
Set oFileSystem = oEdiDoc.GetFileSystem

' Get file object.
Set oFile = oFileSystem.GetFile(App.Path & "\TestFile.TXT")

' Compress using ZIPINFO
oFile.ZipToFile CompressMethod_ZipInfo, App.Path & "\ZipFile_ZipInfo.zip"

' Compress using ZLIB
oFile.ZipToFile CompressMethod_ZLib, App.Path & "\ZipFile_ZLib.zip"

MsgBox "Done"

Samples