By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Code to Unzip file from Outlook message

P: n/a
Jim
I have a user who works remotely who just does not understand the
concept of zipping and unzipping files no matter how many times I
explain it. I need to create something for her that will do the
following:

* She receives an outlook message with a zipped file and opens the
message.
* She opens an Access "Utilities" database and clicks a button labeled
"Unzip updated database from eMail message"
* Somehow the code behind the button looks for the open eMail message,
unzips the attached file, and places it in "E:\NewDB\Data.mdb"
overwriting the existing Data.mdb file that's there.

Can this be done? Any help would be appreciated!

Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 21 Jul 2005 06:21:19 -0700, "Jim" <jl*******@gmail.com> wrote:
I have a user who works remotely who just does not understand the
concept of zipping and unzipping files no matter how many times I
explain it. I need to create something for her that will do the
following:

* She receives an outlook message with a zipped file and opens the
message.
* She opens an Access "Utilities" database and clicks a button labeled
"Unzip updated database from eMail message"
* Somehow the code behind the button looks for the open eMail message,
unzips the attached file, and places it in "E:\NewDB\Data.mdb"
overwriting the existing Data.mdb file that's there.

Can this be done? Any help would be appreciated!

Yes but other things would be much easier if you can find an interface that she understands.
For instance, could she drag the attachment from outlook and drop it on an icon on the
desktop or in the folder you use? This could be a batch file or script which does whatever you want.

Nov 13 '05 #2

P: n/a
Jim
Yes, I could have her drop it on the desktop...

Nov 13 '05 #3

P: n/a
WinZip provides a command line utility that interfaces with WinZip and
accepts variable input. You can SHELL to that utility passing the
zip/unzip action and command line parameters as a string.

http://www.winzip.com/downcl.htm

The command line utility help file provides syntax for the command line
parameters.

Here's a snitch of code from one of my projects. This will take a
variablly named text file and zip it into a variably password protected
zip file in the background.

<compiled code>
wkPath = GetFilePath(CodeDb.Name) & "DataFiles\"
ChDir wkPath

wkText = wkPath & Me.ufISACFtpSource
wkZipt = wkPath & Me.ufISACFtpDest
wkDest = Me.ufISACFtpDest

wkCmnd = "C:/Program Files/WinZip/wzzip.exe -s" & Me.ufISACFtpPwd & "
""" & wkZipt & """ """ & wkText & """"
OK = Shell(wkCmnd, vbMinimizedNoFocus)

</compiled code>

Outlook is a programmable interface that will enable you to manipulate
its data store programmatically. I've never done it, but you should be
able set a reference to the outlook libraries in order to manipulate
them from Access.

Another alternative might be to license the WinZip self-extractor. If
you can get an attached executable past the corporate firewall, all
your user would have to do is double-click the attached executable.

Oops. Did I say that out loud?

King Ron of Chi

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.