Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default winzip in macro

Help, I have written a macro that performs calculations in
a spreadsheet and e-mails it to the relevant people. The
problem I have is that the file is large and would benefit
from compression, is there a way of writing this in to the
Macro.

Thanks
Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default winzip in macro

Hi Michael,

on the winzip-website you should find a download called something like
"command line utility" which zips files with lots of parameters from the
command line. You can include this compose this command in the excel-makro
with the "Shell" command, look vba-help for details on shell.

regards

arno

problem I have is that the file is large and would benefit
from compression, is there a way of writing this in to the
Macro.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default winzip in macro

Michael,

Here is something Ron de Bruin wrote on this subject

On the zipping part, you may want to check WinZip's web site. A few months
ago they introduced an addin to Winzip called the command line support addon
which lets you enter command switches with the Basic Winzip command. you
could then use some code like this:

Sub Zip_File()
Dim Zip_Path As String, Command_Text As String, My_Prog
Try_Drive
Zip_Path = File_Sh.[AH13]
' Delete the old zip file if it exists to avoid adding this file
Command_Text = Zip_Path & Path_Sep & "wzzip -yp spc.zip spc.xls"
My_Prog = Shell(Command_Text, vbMaximizedFocus)
End Sub

The one "gotcha" I never got past was that unless the user is using Outlook,
the only file I could zip and mail was the open workbook using the
File.SendMail command. One of these days I'm going to write a macro to use
outlook but just haven't yet gottn to it.



--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Michael" wrote in message
...
Help, I have written a macro that performs calculations in
a spreadsheet and e-mails it to the relevant people. The
problem I have is that the file is large and would benefit
from compression, is there a way of writing this in to the
Macro.

Thanks
Michael



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default winzip in macro

Hi Bob/Michael

See this example

http://www.rondebruin.nl/sendmail.htm#Zip

My Outlook Add-in have this option also
http://www.rondebruin.nl/sendmail-addin.htm

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Bob Phillips" wrote in message ...
Michael,

Here is something Ron de Bruin wrote on this subject

On the zipping part, you may want to check WinZip's web site. A few months
ago they introduced an addin to Winzip called the command line support addon
which lets you enter command switches with the Basic Winzip command. you
could then use some code like this:

Sub Zip_File()
Dim Zip_Path As String, Command_Text As String, My_Prog
Try_Drive
Zip_Path = File_Sh.[AH13]
' Delete the old zip file if it exists to avoid adding this file
Command_Text = Zip_Path & Path_Sep & "wzzip -yp spc.zip spc.xls"
My_Prog = Shell(Command_Text, vbMaximizedFocus)
End Sub

The one "gotcha" I never got past was that unless the user is using Outlook,
the only file I could zip and mail was the open workbook using the
File.SendMail command. One of these days I'm going to write a macro to use
outlook but just haven't yet gottn to it.



--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Michael" wrote in message
...
Help, I have written a macro that performs calculations in
a spreadsheet and e-mails it to the relevant people. The
problem I have is that the file is large and would benefit
from compression, is there a way of writing this in to the
Macro.

Thanks
Michael





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default winzip in macro

Ron,

I should have known you would have one by now<G

Bob

"Ron de Bruin" wrote in message
...
Hi Bob/Michael

See this example

http://www.rondebruin.nl/sendmail.htm#Zip

My Outlook Add-in have this option also
http://www.rondebruin.nl/sendmail-addin.htm

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Bob Phillips" wrote in message

...
Michael,

Here is something Ron de Bruin wrote on this subject

On the zipping part, you may want to check WinZip's web site. A few

months
ago they introduced an addin to Winzip called the command line support

addon
which lets you enter command switches with the Basic Winzip command.

you
could then use some code like this:

Sub Zip_File()
Dim Zip_Path As String, Command_Text As String, My_Prog
Try_Drive
Zip_Path = File_Sh.[AH13]
' Delete the old zip file if it exists to avoid adding this file
Command_Text = Zip_Path & Path_Sep & "wzzip -yp spc.zip spc.xls"
My_Prog = Shell(Command_Text, vbMaximizedFocus)
End Sub

The one "gotcha" I never got past was that unless the user is using

Outlook,
the only file I could zip and mail was the open workbook using the
File.SendMail command. One of these days I'm going to write a macro to

use
outlook but just haven't yet gottn to it.



--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Michael" wrote in message
...
Help, I have written a macro that performs calculations in
a spreadsheet and e-mails it to the relevant people. The
problem I have is that the file is large and would benefit
from compression, is there a way of writing this in to the
Macro.

Thanks
Michael









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default winzip in macro


"Michael" wrote in message
...
Help, I have written a macro that performs calculations in
a spreadsheet and e-mails it to the relevant people. The
problem I have is that the file is large and would benefit
from compression, is there a way of writing this in to the
Macro.

Thanks
Michael



There are a number of libraries available for this ranging
from the free infozip libraries (a little tricky to use from VBA
I suspect) to the commercial libraries marketted by XCEED

http://www.vbaccelerator.com/codelib/zip/zipvb.htm
www.xceedsoft.com/products/ZipCompL/

You may simply be able to use the old DOS Pkzip program
with the shell command

Keith


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel converting to a Winzip file when emailed robertma Excel Discussion (Misc queries) 1 August 2nd 06 03:27 PM
run winzip in excel macro pamela Excel Discussion (Misc queries) 1 July 12th 06 01:07 PM
Transfer CSV file from Winzip to Excel kookaburra Excel Discussion (Misc queries) 6 July 28th 05 03:56 AM
Open WinZip from Excel Jeff Armstrong Excel Programming 1 October 28th 03 09:45 PM
WinZip extract Keith[_7_] Excel Programming 11 October 17th 03 03:22 PM


All times are GMT +1. The time now is 06:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"