From: Brad on
I have an excel file that has two columns, Code and Filename.
i.e.
CODE Filename
Abc 123456.txt
Abc 123457.txt
Def 123458.txt
Def 123459.txt
Etc…
I would like to be able to select all files with a specific Code and have
them zipped into a file that is named the same as the Code. i.e. Abc.zip
would contain 123456.txt & 123457.txt AND Def.zip would contain 123458.txt &
123459.txt
The file names are actually quite random but they are associated with
specific codes according to this Excel file.
I am creating an Access form that will allow users to browse to the Excel
file and would like to be able to code this form to perform the above
operation automatically. Is this possible in VBA? We are using Access 2003 &
Pkzip
Any ideas?
Regards
Brad

From: Albert D. Kallal on
I have some Access code here that should help:

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


You don't need pkzip installed for it to run, but do have the place the
included .dll's in the same dir.


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal(a)msn.com


From: Brad on
Thanks so much Albert!
However, as i understand it, your code doesn't allow selection of multiple
files.
and I am having a heck of a time figuring out the syntax for the Shell
command to run this command line.
pkzipc -add test.zip *.doc
Could you please advise?
Thanks again.

"Albert D. Kallal" wrote:

> I have some Access code here that should help:
>
> http://www.members.shaw.ca/AlbertKallal/zip/index.htm
>
>
> You don't need pkzip installed for it to run, but do have the place the
> included .dll's in the same dir.
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal(a)msn.com
>
>
From: Douglas J. Steele on
Take a look at what I've got at
http://www.databasejournal.com/features/msaccess/article.php/3835766/Working-with-Compressed-zipped-folders-in-MS-Access.htm

--
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:A7DEC820-2746-40AE-AB7A-E03B2F2B7F10(a)microsoft.com...
>I have an excel file that has two columns, Code and Filename.
> i.e.
> CODE Filename
> Abc 123456.txt
> Abc 123457.txt
> Def 123458.txt
> Def 123459.txt
> Etc.
> I would like to be able to select all files with a specific Code and have
> them zipped into a file that is named the same as the Code. i.e. Abc.zip
> would contain 123456.txt & 123457.txt AND Def.zip would contain 123458.txt
> &
> 123459.txt
> The file names are actually quite random but they are associated with
> specific codes according to this Excel file.
> I am creating an Access form that will allow users to browse to the Excel
> file and would like to be able to code this form to perform the above
> operation automatically. Is this possible in VBA? We are using Access 2003
> &
> Pkzip
> Any ideas?
> Regards
> Brad
>


From: Albert D. Kallal on
"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