From: Brad on
This may be a double Post, please forgive me, the system seemed to fail on
the first attempt.
First of all let me thank yourself and Doug Steel for the extensive code. It
may be in fact more than I need. After playing with some code, as I see it, I
may be importing the Excel file into a table and then creating & cycling thru
a recordset to look for a specific Code and then select the Filename to Add
to a specific Zip file, then go to the next record and continue...
So my question is; "How do I execute the Pkzip command line from within
VBA?" The is is what the Pkzip Manual says has to be executed.
pkzipc -add ABC.zip filenam.doc
But i don't understand how to do that from VBA.
Am i making any sense?
Thanks Guys!!!!

"Albert D. Kallal" wrote:

> "Brad(a)Cibc" <BradCibc(a)discussions.microsoft.com> wrote in message
> news:192529B8-D0BC-404A-B9AA-F7E3CD00E7A4(a)microsoft.com...
> > Thanks so much Albert!
> > However, as i understand it, your code doesn't allow selection of multiple
> > files.
>
> Well, I just don't have a UI setup, but can pass it wild cards and it will
> work fine. So, you not limited to just one file.
>
> It really comes down to how the selection of files is going to occur
> here....
>
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal(a)msn.com
>
>
From: Douglas J. Steele on
Try:

Shell "pkzipc -add ABC.zip filenam.doc", vbHide

If you're trying to include full paths to file names, remember that if there
are spaces in the path, you have to enclose the name in quotes:

Shell "pkzipc -add C:\Archive\ABC.zip ""C:\Folder With Space\filenam.doc""",
vbHide

If you're trying to do this with variables, assume your archive name
(ABC.zip) is stored in variable strArchive, and you're trying to add strFile
(filenam.doc)

Shell "pkzipc -add """ & strArchive & """ """ & strFile & """", vbHide

That's three double quotes in a row before & strArchive, three double quotes
in a row followed by a space then three more double quotes in a row after
strArchive & four double quotes in a row after strFile &




--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
Co-author: Access 2010 Solutions, published by Wiley
(no e-mails, please!)

"Brad(a)Cibc" <BradCibc(a)discussions.microsoft.com> wrote in message
news:CC2AD1FE-ADA2-41D0-B6F3-B14C1D4D7C55(a)microsoft.com...
> This may be a double Post, please forgive me, the system seemed to fail on
> the first attempt.
> First of all let me thank yourself and Doug Steel for the extensive code.
> It
> may be in fact more than I need. After playing with some code, as I see
> it, I
> may be importing the Excel file into a table and then creating & cycling
> thru
> a recordset to look for a specific Code and then select the Filename to
> Add
> to a specific Zip file, then go to the next record and continue...
> So my question is; "How do I execute the Pkzip command line from within
> VBA?" The is is what the Pkzip Manual says has to be executed.
> pkzipc -add ABC.zip filenam.doc
> But i don't understand how to do that from VBA.
> Am i making any sense?
> Thanks Guys!!!!
>
> "Albert D. Kallal" wrote:
>
>> "Brad(a)Cibc" <BradCibc(a)discussions.microsoft.com> wrote in message
>> news:192529B8-D0BC-404A-B9AA-F7E3CD00E7A4(a)microsoft.com...
>> > Thanks so much Albert!
>> > However, as i understand it, your code doesn't allow selection of
>> > multiple
>> > files.
>>
>> Well, I just don't have a UI setup, but can pass it wild cards and it
>> will
>> work fine. So, you not limited to just one file.
>>
>> It really comes down to how the selection of files is going to occur
>> here....
>>
>>
>>
>> --
>> Albert D. Kallal (Access MVP)
>> Edmonton, Alberta Canada
>> pleaseNOOSpamKallal(a)msn.com
>>
>>