Welcome to the { mindfrost82.com } forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-2008, 06:34 AM
CWLee
 
Posts: n/a
Attaching Chart to Email?


I have an Excel spreadsheet, and derived from it 5 charts.
How can I attach one of the charts to an email to send to
someone?

(I know how to attach the whole spreadsheet, and the
associated charts, but I don't want to send the spreadsheet
and the other 4 charts, because they contain data not
appropriate to share with the email recipient.)

Thanks.

--
----------
CWLee
Former slayer of dragons; practice now limited to sacred
cows. Believing we should hire for quality, not quotas, and
promote for performance, not preferences.

Reply With Quote
  #2 (permalink)  
Old 05-26-2008, 04:25 PM
Ron de Bruin
 
Posts: n/a
Re: Attaching Chart to Email?

Hi CWLee

Try this example
http://www.rondebruin.nl/mail/folder2/chart.htm

--

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


"CWLee" <cdubyalee@post.harvard.edu> wrote in message news:e49TyIvvIHA.3760@TK2MSFTNGP04.phx.gbl...
>
> I have an Excel spreadsheet, and derived from it 5 charts.
> How can I attach one of the charts to an email to send to
> someone?
>
> (I know how to attach the whole spreadsheet, and the
> associated charts, but I don't want to send the spreadsheet
> and the other 4 charts, because they contain data not
> appropriate to share with the email recipient.)
>
> Thanks.
>
> --
> ----------
> CWLee
> Former slayer of dragons; practice now limited to sacred
> cows. Believing we should hire for quality, not quotas, and
> promote for performance, not preferences.
>

Reply With Quote
  #3 (permalink)  
Old 05-26-2008, 06:30 PM
CWLee
 
Posts: n/a
Re: Attaching Chart to Email?


"Ron de Bruin" <rondebruin@kabelfoon.nl> wrote

> Try this example
> http://www.rondebruin.nl/mail/folder2/chart.htm


Thanks, but I'm too unsophisticated to follow it. You lost
me after:

Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String
....

Thanks again for responding.

Best regards to all.

Reply With Quote
  #4 (permalink)  
Old 05-26-2008, 06:58 PM
Ron de Bruin
 
Posts: n/a
Re: Attaching Chart to Email?

Hi


Change the path if it not exist

'fill in the file path/name of the gif file
Fname = "C:\My_Sales1.gif"

It will create a gif file in this location and after it send the mail it will delete this file



Change the sheet name to the sheet where the chart is and change the name of the chart in this code line

ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"


Fill in your mail address to test the code
.To = "ron@debruin.nl"


Now Run the code



Sub SaveSend_Embedded_Chart()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

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

'fill in the file path/name of the gif file
Fname = "C:\My_Sales1.gif"

'if you hold down the CTRL key when you select the chart
'in 2000-2003 you see the name in the name box(formula bar)
ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = "ron@debruin.nl"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = "Hi there"
.Attachments.Add Fname
.Send 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


--

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


"CWLee" <cdubyalee@post.harvard.edu> wrote in message news:uENCsj1vIHA.2068@TK2MSFTNGP05.phx.gbl...
>
> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote
>
>> Try this example
>> http://www.rondebruin.nl/mail/folder2/chart.htm

>
> Thanks, but I'm too unsophisticated to follow it. You lost
> me after:
>
> Dim OutApp As Object
> Dim OutMail As Object
> Dim Fname As String
> ...
>
> Thanks again for responding.
>
> Best regards to all.
>

Reply With Quote
  #5 (permalink)  
Old 05-26-2008, 09:33 PM
CWLee
 
Posts: n/a
Re: Attaching Chart to Email?


Thanks again. Sorry to say, I am completely unable to
understand what you suggest as a way to email a chart from
an Excel spreadsheet. I'm sure your technological knowledge
is sound, but your manner of presentation is too advanced
for me. Thanks again.

====================

"Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
news:eYmCto1vIHA.2068@TK2MSFTNGP05.phx.gbl...
> Hi
>
>
> Change the path if it not exist
>
> 'fill in the file path/name of the gif file
> Fname = "C:\My_Sales1.gif"
>
> It will create a gif file in this location and after it
> send the mail it will delete this file
>
>
>
> Change the sheet name to the sheet where the chart is and
> change the name of the chart in this code line
>
> ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart
> 1").Chart.Export _
> Filename:=Fname, FilterName:="GIF"
>
>
> Fill in your mail address to test the code
> .To = "ron@debruin.nl"
>
>
> Now Run the code
>
>
>
> Sub SaveSend_Embedded_Chart()
> 'Working in 2000-2007
> Dim OutApp As Object
> Dim OutMail As Object
> Dim Fname As String
>
> Set OutApp = CreateObject("Outlook.Application")
> OutApp.Session.Logon
> Set OutMail = OutApp.CreateItem(0)
>
> 'fill in the file path/name of the gif file
> Fname = "C:\My_Sales1.gif"
>
> 'if you hold down the CTRL key when you select the
> chart
> 'in 2000-2003 you see the name in the name box(formula
> bar)
> ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart
> 1").Chart.Export _
> Filename:=Fname, FilterName:="GIF"
>
> On Error Resume Next
> With OutMail
> .To = "ron@debruin.nl"
> .CC = ""
> .BCC = ""
> .Subject = "This is the Subject line"
> .Body = "Hi there"
> .Attachments.Add Fname
> .Send 'or use .Display
> End With
> On Error GoTo 0
>
> Kill Fname
> Set OutMail = Nothing
> Set OutApp = Nothing
> End Sub
>
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "CWLee" <cdubyalee@post.harvard.edu> wrote in message
> news:uENCsj1vIHA.2068@TK2MSFTNGP05.phx.gbl...
>>
>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote
>>
>>> Try this example
>>> http://www.rondebruin.nl/mail/folder2/chart.htm

>>
>> Thanks, but I'm too unsophisticated to follow it. You
>> lost me after:
>>
>> Dim OutApp As Object
>> Dim OutMail As Object
>> Dim Fname As String
>> ...
>>
>> Thanks again for responding.
>>
>> Best regards to all.


Reply With Quote
  #6 (permalink)  
Old 05-26-2008, 09:49 PM
Ron de Bruin
 
Posts: n/a
Re: Attaching Chart to Email?

If it is your fist macro it is not so easy <g>

Send me your workbook private and tell me which chart you want to send and I will
add the code to the workbook for you



--

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


"CWLee" <cdubyalee@post.harvard.edu> wrote in message news:%23fI5H$2vIHA.2188@TK2MSFTNGP04.phx.gbl...
>
> Thanks again. Sorry to say, I am completely unable to
> understand what you suggest as a way to email a chart from
> an Excel spreadsheet. I'm sure your technological knowledge
> is sound, but your manner of presentation is too advanced
> for me. Thanks again.
>
> ====================
>
> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote in message
> news:eYmCto1vIHA.2068@TK2MSFTNGP05.phx.gbl...
>> Hi
>>
>>
>> Change the path if it not exist
>>
>> 'fill in the file path/name of the gif file
>> Fname = "C:\My_Sales1.gif"
>>
>> It will create a gif file in this location and after it
>> send the mail it will delete this file
>>
>>
>>
>> Change the sheet name to the sheet where the chart is and
>> change the name of the chart in this code line
>>
>> ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart
>> 1").Chart.Export _
>> Filename:=Fname, FilterName:="GIF"
>>
>>
>> Fill in your mail address to test the code
>> .To = "ron@debruin.nl"
>>
>>
>> Now Run the code
>>
>>
>>
>> Sub SaveSend_Embedded_Chart()
>> 'Working in 2000-2007
>> Dim OutApp As Object
>> Dim OutMail As Object
>> Dim Fname As String
>>
>> Set OutApp = CreateObject("Outlook.Application")
>> OutApp.Session.Logon
>> Set OutMail = OutApp.CreateItem(0)
>>
>> 'fill in the file path/name of the gif file
>> Fname = "C:\My_Sales1.gif"
>>
>> 'if you hold down the CTRL key when you select the
>> chart
>> 'in 2000-2003 you see the name in the name box(formula
>> bar)
>> ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart
>> 1").Chart.Export _
>> Filename:=Fname, FilterName:="GIF"
>>
>> On Error Resume Next
>> With OutMail
>> .To = "ron@debruin.nl"
>> .CC = ""
>> .BCC = ""
>> .Subject = "This is the Subject line"
>> .Body = "Hi there"
>> .Attachments.Add Fname
>> .Send 'or use .Display
>> End With
>> On Error GoTo 0
>>
>> Kill Fname
>> Set OutMail = Nothing
>> Set OutApp = Nothing
>> End Sub
>>
>>
>> --
>>
>> Regards Ron de Bruin
>> http://www.rondebruin.nl/tips.htm
>>
>>
>> "CWLee" <cdubyalee@post.harvard.edu> wrote in message
>> news:uENCsj1vIHA.2068@TK2MSFTNGP05.phx.gbl...
>>>
>>> "Ron de Bruin" <rondebruin@kabelfoon.nl> wrote
>>>
>>>> Try this example
>>>> http://www.rondebruin.nl/mail/folder2/chart.htm
>>>
>>> Thanks, but I'm too unsophisticated to follow it. You
>>> lost me after:
>>>
>>> Dim OutApp As Object
>>> Dim OutMail As Object
>>> Dim Fname As String
>>> ...
>>>
>>> Thanks again for responding.
>>>
>>> Best regards to all.

>

Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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



All times are GMT. The time now is 04:03 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Free Ringtones | Grand Theft Auto Mp3 | Libro arquitectura | Online Degrees | Car Loans



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114