Next Tip   Zip A File

Here I will show you a simple way to add a file to a zip file using Access VBA and WinZIp

Call ZipFile_FX("c:\a.zip", "c:\a.xls")
 
Private Sub ZipFile_FX(ZipFileName As String, fileToBeZipped As String)

  Const ZIPEXELOCATION = "c:\program files\winzip\winzip32.exe"

  Shell ZIPEXELOCATION & " -a " & Chr(34) & ZipFileName & Chr(34) & _
" " & Chr(34) &   fileToBeZipped & Chr(34), vbNormalFocus

End Sub

Command line parameters for WinZip  

Winzip is one of the most popular programs on the planet and if you want to automate it, they recommend upgrading to Winzip Pro and installing the free command line utility. If you want to try command line parameters without upgrading to Winzip pro, try the commands on this page using Windows Start then the Run text box.   Read more here

Other Pages at VB123.com That You May Want To Visit

Cleaning Up An Access Database
Converting Excel Spreadsheets To Microsoft Access

Outside Vb123.com

How to Zip using Windows Library
http://www.naterice.com/blog/template_permalink.asp?id=64

PolarZip is easy to write code for as long as you can handle DLL installs

Try this idea
http://www.members.shaw.ca/AlbertKallal/zip/index.htm

 

Click on the Next Tip button for the next help page in this Access Loop.

 

Our Tools and Resources

  • RSS & Newsletter Here
    Join our newsfeed or sign up for our informative newsletter on Office Automation, Access and VB topics

  • The Workbench
    Find out who has your database open, start the correct version of Access, easy compacting and backups, change startup options, creation versions,  shutdown database

  • Read about the Toolbox
    Sample downloads, library resource kit and searchable help file comprising most of the information at vb123.com.au plus hidden downloads etc.

  • Convert Access to SQL Server  
    Upsize to SQL Server 2005 or 2008, easily repeated conversions, highly accurate SQL query  translation and web form conversion.

  • Datamining & Graphs in Access
    Explore your data with this versatile graphing and data mining shareware tool.

  • Expression/SharePoint Web Conversions  
    FrontPage to Expression Web or SharePoint Designer, its a good way to improve your website

 

vb123 Professionals


Get Good Help Here

If you need help with a database or Office programming, our Professionals could be the answer because we have worked on many similar solutions



Frontpage Conversions
We have converted vb123.com to Expression Web, contact us if we can help you move to the latest Microsoft web tool.


About The Editor ~ Contact Us
Garry Robinson writes for a number of popular computer magazines, is now a book author and has worked on 100+ Access databases. He is based in Sydney, Australia

Access 2003 Security

MS Access Security

Read More here