title: VBA copy file to .zip difficulty
body: <p>I am trying to package roughly 20-30 excel files into one zip to be emailed out after a process completes.  I am able to create the .zip file, and to copy files from one directory to another.  What I have not been able to do is copy a file into the .zip file.  Here is the code I have:</p>
  
  <hr>
  
  <pre><code>zipFile = "C:\testZip.zip"
  zipPath = "C:\testZipFolder\"
  NewZip (zipFile)
  Set fs = CreateObject("scripting.filesystemobject")
  file = Dir(zipPath)
  Set zipFolder = fs.getfolder(zipPath)
  While (file &lt;&gt; "")
    If InStr(file, ".xlsx") &gt; 0 Then
              I = I + 1
              Set f = fs.getfile("C:\" &amp; file)
              f.Copy (zipPath)
              Debug.Print Err.Number
              Debug.Print Err.Description
  </code></pre>
  
  <p>NewZip is a method that creates the .zip file.  I can open the .zip and move a file to it manually.  When I run the above code I get error 438: Object doesn't support this property or method.  If I change the destination path to some other folder, it will copy the file.</p>