Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Mail multiple charts instead of multi. sheets

I have tried mailing sheets using the code at the bottom.
Code taken from Ron DeBruin's web site:
http://www.rondebruin.nl/sendmail.htm

It works fine for sheets. However, I am interested in
sending charts instead of sheets.

I can send individual charts but would like to group them
into multiple pages of charts in one workbook.

Suggestions?

Ken

Sub Mail_sheets()
Dim MyArr As Variant
Dim last As Long
Dim shname As Long
Dim a As Integer
Dim Arr() As String
Dim N As Integer
Dim strdate As String
Dim wb As Workbook
For a = 1 To 253 Step 3
If ThisWorkbook.Sheets("mail"). _
Cells(1, a).Value = "" Then Exit Sub
Application.ScreenUpdating = False
strdate = Format(Now, "dd-mm-yy h-mm-ss")
With ThisWorkbook.Sheets("mail")
MyArr = .Range(.Cells(1, a + 1), _
..Cells(Rows.Count, a + 1).End(xlUp))
End With
last = ThisWorkbook.Sheets("mail").Cells
(Rows.Count, a).End(xlUp).Row
N = 0
For shname = 1 To last
N = N + 1
ReDim Preserve Arr(1 To N)
Arr(N) = ThisWorkbook.Sheets("mail").Cells
(shname, a).Value
Next shname
ThisWorkbook.Worksheets(Arr).Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Part of " & ThisWorkbook.Name _
& " " & strdate & ".xls"
.SendMail MyArr, ThisWorkbook.Sheets
("mail").Cells(1, a + 2).Value
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True
Next a
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Mail multiple charts instead of multi. sheets

Ken

You haven't taken one of Ron's simpler samples :)
This one is a bit more complex than some others


Would have been nice to have the code documented...
now you have to first analyse what it does.

Apparently the worksheet "mail" contains:
the addresses to be mailed in COl B (step3)
the sheets to be mailed in COL A (step3)

Then it start selecting WORKSHEETS instead of SHEETS
thus it wont find charts!

Change this line
'ThisWorkbook.Worksheets(Arr).Copy
Into
ThisWorkbook.Sheets(Arr).Copy


and Ron's code should work fine.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


wrote:


I have tried mailing sheets using the code at the bottom.
Code taken from Ron DeBruin's web site:
http://www.rondebruin.nl/sendmail.htm

It works fine for sheets. However, I am interested in
sending charts instead of sheets.

I can send individual charts but would like to group them
into multiple pages of charts in one workbook.

Suggestions?

Ken

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Mail multiple charts instead of multi. sheets

One way to do that is to export the chart as a gif and then create a
mail object that sends that gif as an attachment. You could embed it in
the body of the email using HTML code and setting the type of email as
HTML.

Let me know if you need/want details.

Mark

---
Mark Bigelow
mjbigelow at hotmail dot com
http://hm.imperialoiltx.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
multi variable calcs on multiple sheets... Derrick Excel Discussion (Misc queries) 4 June 18th 09 02:36 AM
Update same charts in multiple sheets at once Div[_2_] Excel Worksheet Functions 1 January 28th 09 08:10 PM
Simultaneously updating Charts in Multiple sheets J Shrimps, Jr. Excel Worksheet Functions 1 April 23rd 06 05:13 AM
quick charting question for similar charts on multiple sheets Boon8888 Charts and Charting in Excel 2 January 27th 06 07:33 PM
Multi- charts Paul Charts and Charting in Excel 3 March 5th 05 10:26 PM


All times are GMT +1. The time now is 08:53 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"