Good Afternoon,
I am trying to find some code that will help me ZIP each file individually in a specific / predetermined location using WINZIP64.exe adding the same password to each zip file.
I have kind of gone through circle a bit on the internet. As a bit of background; I have a macro which organises some a set of data and then creates a pdf from a workbook. We then want to zip each of these pdf's into a password protected zip file which would then be e-mailed out.
I believe the below code will cycle or loop through the files in the folder, I now need help in creating the code to create the individually password protected zip file.
As always, all help is greatly appreciated.
Tom
I am trying to find some code that will help me ZIP each file individually in a specific / predetermined location using WINZIP64.exe adding the same password to each zip file.
I have kind of gone through circle a bit on the internet. As a bit of background; I have a macro which organises some a set of data and then creates a pdf from a workbook. We then want to zip each of these pdf's into a password protected zip file which would then be e-mailed out.
I believe the below code will cycle or loop through the files in the folder, I now need help in creating the code to create the individually password protected zip file.
Code:
Sub ZIP()
Dim directory As String
directory = Sheets("MASTER").Range("I11").Value & "\"
Dim fso, newFile, folder, files
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(directory)
Set files = folder.files
For Each file In files
'INSERT ZIP CODE HERE
'END ZIP CODE HERE
Next
End Sub
As always, all help is greatly appreciated.
Tom