Is there any way to zip an excel file or any files through VB macro only and without WinZip installed nor any special stand alone zipping tool that can be shelled.
Thanks...
Is there any way to zip an excel file or any files through VB macro only and without WinZip installed nor any special stand alone zipping tool that can be shelled.
Thanks...
Yes you can. I have a class module that does this to Office files to extract its contents and put them back together again. Modify to suit your need:
http://www.jkp-ads.com/articles/Exce...leFormat02.asp
Depending on your windows version:
http://www.rondebruin.nl/zip.htm
or
http://blogs.ugidotnet.org/fgiossi/a...sic-6-and.aspx
Guess where my code came from :-)
Jan, I am sure that your class is great as is most of your code!
Thank you for that Jan. I tried fetching the code for zipping the file only but I encountered an error (runtime error 91). Would you please provide just for the zipping files alone as the zipped file is my final touch and no unzipping and zipping 'em back necessary.
Thanks...
Rather that updating my code, I'd suggest to use Ron de Bruin's simpler code which only zips:
http://www.rondebruin.nl/windowsxpzip.htm
Thank you again. Sorry but one last request though.
Rather than browsing the files you want to zip, I would like it to just prompt an input box and I will just paste the path of the files there (e.g. "D:\zipping folder\". The "zipping folder" folder contains the files themselves). Would that be possible? I pray so.
Thanks so much. You really did help me a lot!
First, try Ron's Zip_All_Files_in_Folder_Browse() and post back. The Windows operating system will make a difference.