Professional Documents
Culture Documents
Zip
Zip
' Set the path to the folder containing the PDF files
pdfFolderPath = "C:\Path\To\PDF\Folder"
' Loop through each PDF file and add it to the zip file
Do While pdfFiles <> ""
pdfFile = pdfFolderPath & "\" & pdfFiles
objZipFile.CopyHere objFolder.Items.Item(pdfFile)
pdfFiles = Dir
Loop
' Wait until all files are copied to the zip file
Do Until objZipFile.Items.Count = objFolder.Items.Count
Application.Wait Now + TimeValue("0:00:01")
Loop