Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default How to zip a file before sending it out by macro?

Hi,

Below is the code to send directly am email with the excel workbook
attached. But does anyone know how can I (by using macro) zip the file before
sending it out?

Private Sub CmdSubmit_Click()
WhereTo = Range("K2")
SubjectText = "Example for " & Range("C3") & " - " & Range("C4")
ActiveWorkbook.SendMail Recipients:=WhereTo, Subject:=SubjectText
End Sub

Thanks and regards,
Jackie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to zip a file before sending it out by macro?

Hi Jackie

If you use winzip and use Outlook I have code and a Add-in that can do this on my site
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jackie" wrote in message ...
Hi,

Below is the code to send directly am email with the excel workbook
attached. But does anyone know how can I (by using macro) zip the file before
sending it out?

Private Sub CmdSubmit_Click()
WhereTo = Range("K2")
SubjectText = "Example for " & Range("C3") & " - " & Range("C4")
ActiveWorkbook.SendMail Recipients:=WhereTo, Subject:=SubjectText
End Sub

Thanks and regards,
Jackie



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default How to zip a file before sending it out by macro?

Hi Ron,

Thanks a lot and I find that your site is really useful :)

Regarding to the code in your website, I've encountered a problem when I
tried to run the macro under "Zip and mail the ActiveWorkbook". I got the
below error message:

Compile error: Sub or Function not defined

and the line below is highlighted:

ShellAndWait ShellStr, vbHide

Would you please advise if there is anything wrong with "ShellAndWait" or do
I need to make some changes in the code before running it?

Thanks,
Jackie

"Ron de Bruin" wrote:

Hi Jackie

If you use winzip and use Outlook I have code and a Add-in that can do this on my site
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jackie" wrote in message ...
Hi,

Below is the code to send directly am email with the excel workbook
attached. But does anyone know how can I (by using macro) zip the file before
sending it out?

Private Sub CmdSubmit_Click()
WhereTo = Range("K2")
SubjectText = "Example for " & Range("C3") & " - " & Range("C4")
ActiveWorkbook.SendMail Recipients:=WhereTo, Subject:=SubjectText
End Sub

Thanks and regards,
Jackie




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to zip a file before sending it out by macro?

See the functions on that page

http://www.rondebruin.nl/zip.htm#Functions



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jackie" wrote in message ...
Hi Ron,

Thanks a lot and I find that your site is really useful :)

Regarding to the code in your website, I've encountered a problem when I
tried to run the macro under "Zip and mail the ActiveWorkbook". I got the
below error message:

Compile error: Sub or Function not defined

and the line below is highlighted:

ShellAndWait ShellStr, vbHide

Would you please advise if there is anything wrong with "ShellAndWait" or do
I need to make some changes in the code before running it?

Thanks,
Jackie

"Ron de Bruin" wrote:

Hi Jackie

If you use winzip and use Outlook I have code and a Add-in that can do this on my site
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jackie" wrote in message ...
Hi,

Below is the code to send directly am email with the excel workbook
attached. But does anyone know how can I (by using macro) zip the file before
sending it out?

Private Sub CmdSubmit_Click()
WhereTo = Range("K2")
SubjectText = "Example for " & Range("C3") & " - " & Range("C4")
ActiveWorkbook.SendMail Recipients:=WhereTo, Subject:=SubjectText
End Sub

Thanks and regards,
Jackie






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 - Sending file using File/Send to/Mail Recipient Dawn Excel Discussion (Misc queries) 0 March 21st 10 09:24 PM
Excel - Sending file using File/Send to/Mail Recipient Dawn Excel Discussion (Misc queries) 0 March 21st 10 09:20 PM
Sending file to Vista PC via email frustrated Excel Worksheet Functions 0 December 10th 08 05:46 PM
how to automate excel file sending by outlook from within the file Adrian Excel Discussion (Misc queries) 1 September 12th 08 01:59 PM
Sending editable Excel file Pradeepk Excel Discussion (Misc queries) 4 February 6th 07 11:51 AM


All times are GMT +1. The time now is 07:43 AM.

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

About Us

"It's about Microsoft Excel"