Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Zipping the current Excel Spreadsheet with PkZip

Ahaa, you are not the only one that make that mistake <g

Good luck and if you need help post back

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"dantee" wrote in message ...
Ron...

One of the programmers here helped me... told me a little trick that makes a
big difference. He showed me that I actually needed to extract the Excel
file from the zip file to allows the code to work properly. Just opening the
Excel file was not yielding the proper results. Now it is.

I'm going to go ahead and modify it for my purposes and see if I don't get
stuck somewhere again. Thanks for posting all this great time-saving code!

Dante

"Ron de Bruin" wrote:

Download the workbook (body) example from my mail page
Let me know if this is working or not
http://www.rondebruin.nl/sendmail.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"dantee" wrote in message ...
Hi Ron.

No, it is not. I'm trying something simpler... just emailing the contents
on a spreadsheet worksheet, and your code makes the email the but is failing
to put the contents of the sheet on the email body...

.HTMLBody = RangetoHTML(rng)

doesn't seem to be working (I did copy the RangetoHTML function into the
same module as the macro). Perhaps the problem may be my settings in
Outlook? Any help would be great. Here is your code, which I am using:

Sub Mail_Sheet_Outlook_Body()
' Don't forget to copy the function RangetoHTML in the module.
' Working in Office 2000-2007
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With

Set rng = Nothing
Set rng = ActiveSheet.UsedRange
'You can also use a sheet name
'Set rng = Sheets("YourSheet").UsedRange

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
With OutMail
.To = "
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.HTMLBody = RangetoHTML(rng)
.Display 'or use .Send
End With
On Error GoTo 0

With Application
.EnableEvents = True
.ScreenUpdating = True
End With

Set OutMail = Nothing
Set OutApp = Nothing
End Sub




Sincerely,
Dante



"Ron de Bruin" wrote:

Hi Dante

Is the code from my site working correct for you ?
http://www.rondebruin.nl/windowsxpzip.htm


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
Zipping my Excel Files and maintain the folder structure Sabine Excel Discussion (Misc queries) 2 August 10th 07 06:02 PM
Can Excel automatically enter the current date in a spreadsheet? Donna Excel Discussion (Misc queries) 3 August 3rd 06 08:11 PM
How can I reduce the size of my Excel file without zipping it? Sizerd Excel Discussion (Misc queries) 1 February 13th 06 11:58 AM
Zipping Excel files Eric[_6_] Excel Programming 2 September 22nd 03 03:19 PM
How to open another Excel spreadsheet to copy data into current spreadsheet ? Ricky Pang Excel Programming 0 July 13th 03 01:59 PM


All times are GMT +1. The time now is 05:17 PM.

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"