Attribute VB_Name = "ZipFiles" Public Sub Zip_All_Files_in_Folder() Dim FileNameZip As Variant Dim FolderName As Variant Dim ZipPath As Variant Dim strDate As String Dim oApp As Object ' --------------------------------- ' INPUTS FolderPath = "C:\Users\Test\Documents\My Files\" '<< EDIT ME: The folder containing the files to zip. ZipPath = "C:\Users\Test\Documents\ZipFolder\" ' << EDIT ME: The output zip file MUST be created in a different folder to all the input stuff, and preferably not in a folder within the files' folder ' EDIT ME: Setup what your zip is going to be called strDate = Format(Date, "dd-mm-yy") FileNameZip = ZipPath & "Zip Title Goes Here " & strDate & ".zip" ' ---------------------------------- ' ZIP ROUTINE 'Create empty Zip File, calling the sub in the next proceedure NewZip (FileNameZip) Set oApp = CreateObject("Shell.Application") ' Now we actually copy the files to the compressed folder: ' The following line copies to the location (namespace) on the left, everything in the location on the right oApp.Namespace(FileNameZip).CopyHere oApp.Namespace(FolderPath).items ' We must keep the script waiting until copying / compressing is done ' This loop keeps checking to find when the number of files in the zip reach the number ' of files in the original folder, then allows the script to end. Do Until oApp.Namespace(FileNameZip).items.Count = _ oApp.Namespace(FolderPath).items.Count ' add a -1 if you are creating the zip in a folder that is within the folder containing all the files Application.Wait (Now + TimeValue("0:00:01")) Loop MsgBox "Zip Creation Complete." End Sub Public Sub NewZip(sPath) 'Creates and empty Zip File used in the sub above. If Len(Dir(sPath)) > 0 Then Kill sPath Open sPath For Output As #1 Print #1, Chr$(80) & Chr$(75) & Chr$(5) & Chr$(6) & String(18, 0) Close #1 End Sub ' Created by Rob De Bruin, changed by keepITcool, Dec-12-2005