Zip an exported table

  • Here is my problem:

    I'm running XP64 and therefore my macro which used to shell out to DOS and run PKZIP to zip up an exported table no longer is working.  So I've been trying to find a 64Bit Zip type program that can be called and ran under this OS (I found 7z.exe to do this) and while it works if I manually enter the command shell and type the command out, I can't get it to work from within a batch file that is called by a macro.

    So I figured I would ask people who might have ran into this (or who might have cleaner ways of doing things) in order to try to find out if there is a program or some sample code that can zip up a file while staying within Access.

    (Note : I mail this file out each day to a vendor of mine and therefore don't need to worry about sizing,etc.  The outgoing mail code that I scrounged up and modified works beautifully still, it's just the zip up part that is broken for me currently).

  • Terry,

    I'm not up to date with XP64 but rather than use a macro could you use a command similar to the following to zip the file:

    Call Shell("z7.exe Zipfile.zip c:\FiletoZip.mdb")

    Richie

  • I don't know much about XP64 either but in your batch file have you set the correct directory.  If the Zip prog works fine manually then it sounds like it may have something to do with the current folder its trying to execute to/from and may be a permissions problem.

    Just a thought

  • I appreciate the replies, however it's not a folder permission issue,etc.

    It's something in XP64 that when Access shells out automatically it won't allow me to run the 7z.exe program in order to zip up my file.  I can't find any information that is helpful so I thought I'd turn here and see if someone might have a code snippet that would do that which I could then just call from a macro.

  • Try to copy the .mdb file into a Temp directory and then zip it.

    I found that with Access you quite often cannot work on the file itself, when it is quite fine to work with a copy. This is exactly what I do in one of my applications.

    Hope this helps.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply