NeedHelp
September 27th, 1999, 11:33 AM
I have a program that processes data, and produces some files. Currently I have to zip these files by hand. Is there some code that allows me to zip these files through code?
|
Click to See Complete Forum and Search --> : Zip files with VB NeedHelp September 27th, 1999, 11:33 AM I have a program that processes data, and produces some files. Currently I have to zip these files by hand. Is there some code that allows me to zip these files through code? czimmerman September 27th, 1999, 11:39 AM See http://www.xceedsoft.com for a great .dll and .ocx for this. NeedHelp September 27th, 1999, 12:08 PM I used your suggestion but I keep receiving an error message that states the following: "At least one 'warning' event was triggered because a recoverable error" I am using the following sample code that they provide. Any thoughts? Private Sub Command1_Click() Dim ResultCode As xcdError XceedZip1.ZipFilename = "L:\Data\Sample.zip" XceedZip1.FilesToProcess = "L:\Data\Sample\*.*" ResultCode = XceedZip1.Zip If ResultCode = xerSuccess Then MsgBox "Files zipped successfully." Else MsgBox XceedZip1.GetErrorDescription(xvtError, ResultCode) End If End Sub Chris Eastwood September 27th, 1999, 02:20 PM You could use my code from the CodeGuru site - it's all wrapped up in two class modules to handle zipping / unzipping and uses the freeware/gnu InfoZip DLL's Take a look at : http://codeguru.developer.com/vb/articles/1854.shtml [Cimperiali: This is the new url...] http://www.codeguru.com/vb/gen/vb_graphics/fileformats/article.php/c6743/ Chris Eastwood CodeGuru - the website for developers http://codeguru.developer.com/vb Royster December 3rd, 2002, 06:06 AM I downloaded your code Chris, made a few alterations and ran it. I worked brilliantly in VB6. I used exactly the same code in Access 2000 and the program appeared to work fine. I had one problem.........no zip file. No matter what I do, I cannot create the zip file from within MS Access 2000. Do you have any ideas as to why? Royster December 3rd, 2002, 11:31 AM I copied the Zip32.dll and unZip32.dll in to the local path of the Access MDB. I actually needed to place it in the winnt\system32 directory. It works fine now. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |