[
  {
    "Id": "501194",
    "ThreadId": "229340",
    "Html": "<p>OK - the vbscript works great but when I had the <em><strong>directoryPathInArchive</strong></em> variable &quot;home&quot; I am getting an error.&nbsp; Any suggestions appreciated.</p>\r\n<p>dim filename&nbsp; <br>filename = &quot;C:\\Temp\\test.zip&quot;</p>\r\n<p>dim zip&nbsp; <br>set zip = CreateObject(&quot;Ionic.Zip.ZipFile&quot;) <br>zip.Encryption = 3 <br>zip.Password = &quot;TEST&quot; <br>zip.AddFile (&quot;C:\\Temp\\test.xls&quot;,<strong>&quot;home&quot;</strong>) <br>zip.Name = filename <br>zip.Save() <br>zip.Dispose() <br>msgbox &quot;Done&quot;</p>",
    "PostedDate": "2010-10-01T11:00:38.16-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "502440",
    "ThreadId": "229340",
    "Html": "And the error is??  You stated that you get an error, but, ah...you didn't mention what the error is!  \r\n<br><br>\r\nIt's ok though; i've seen this situation before. I suspect you are encountering a vbscript syntax error; you must not use parenthesis to invoke a method that takes more than one parameter.  Remove the parens on that line, and you may solve your problem.",
    "PostedDate": "2010-10-05T05:24:20.417-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "502448",
    "ThreadId": "229340",
    "Html": "<p>Thanks for the quick response. I suppose it would make your life easier if I posted the error message!&nbsp; For some reason I can't add &quot;home&quot;. Works great otherwise.</p>\r\n<p><strong>Error: Wrong number of arguments or invalid property assignment.</strong></p>\r\n<p>Here is the code: (that is a comma preceding &quot;home&quot; )</p>\r\n<p>dim filename&nbsp; <br>filename = &quot;C:\\Temp\\test.zip&quot;</p>\r\n<p>dim zip&nbsp; <br>set zip = CreateObject(&quot;Ionic.Zip.ZipFile&quot;) <br>zip.Encryption = 3 <br>zip.Password = &quot;TEST&quot; <br>zip.AddFile &quot;C:\\Temp\\test.xls&quot;, &quot;home&quot;<br>zip.Name = filename <br>zip.Save() <br>zip.Dispose() <br>msgbox &quot;Done&quot;</p>",
    "PostedDate": "2010-10-05T05:45:16.793-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "502518",
    "ThreadId": "229340",
    "Html": "<p>Right -</p>\r\n<p>I just remembered one additional thing.&nbsp; VBScript uses COM to invoke .NET libraries. And COM doesn't support method overloading - you can't have a single method name with different variations, each of which accepts a different set of parameters.</p>\r\n<p>So, you need to use a different name for the method.</p>\r\n<p>AddFile_2 &quot;c:\\test&quot;, &quot;home&quot;</p>\r\n<p>You can read more about this here: <a href=\"http://cheeso.members.winisp.net/DotNetZipHelp/Code Examples/COM.htm\">http://cheeso.members.winisp.net/DotNetZipHelp/Code%20Examples/COM.htm</a></p>\r\n<p>Good luck.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-10-05T08:07:58.717-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "502521",
    "ThreadId": "229340",
    "Html": "<p>I read that article and was a little confused but it all makes sense now.</p>\r\n<p>That did the trick!!! <strong>Many thanks for the quick response!</strong></p>",
    "PostedDate": "2010-10-05T08:13:06.45-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "502975",
    "ThreadId": "229340",
    "Html": "Glad it helped!",
    "PostedDate": "2010-10-06T06:41:34.517-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]