Chitra,
> Yes Chitra is my first name :)
:-) I was asking because you adressed me by my sirname, making me wonder if
I was talking to someone in a region where the persons own name is written
last, and the sirname first.
> Have tried below options :
> 1. Copying those files to folder instead of zip. - Worked
> 2. Copying files to empty zip which was created manually - Access Denied
error.
That seems to indicate that the sourcefiles are not the problem.
> And also if manually copy files to the same empty zip file, it is
allowing.
>
> And answer to your question, after running script, Zip is empty.
That means that the (empty) ZIP file itself is of the right structure.
Could you test what happens when you try to CopyHere to a .ZIP file you
created manually (not by script) ?
If that does *not* work than I am out of ideas I'm afraid.
If it works its possible that the .ZIP file is not actually closed before
you try to CopyHere to it. In that case putting a "sleep" between ... Hold
the presses!
I just took another look at the code you posted, and only now noticed
something I should have much earlier: where do you *close* the .ZIP file
after you've created it ?
Try adding "ts.close" just below the "Set ts = fso.OpenTextFile(...)" line
and see what happens.
Explanation: If the file is still open when the CopyHere command tries to
access it (trying to open it itself) it won't work.
Hope that helps,
Regards,
Rudy Wieser
-- Origoional message:
fa9fa6c3-3da5-433a...@googlegroups.com...