ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Photos in excel and email (https://www.excelbanter.com/excel-programming/323625-photos-excel-email.html)

Alvin Hansen[_2_]

Photos in excel and email
 
Hi
I have a macro there send a email made in html
so far so good its working. I take the values from a sheet in excel
but in this sheet there are also a picture, and in a html code the pictures
are a link to a souce file, is there someway to take the picture from the
sheet and put it in the html code whitout have the photo as a source file?
If i make a email in outlook i can put a picture into the email so maybe also
when i create this email from excel ??

Hope someone knows somthing about this

Regards alvin


Ron de Bruin

Photos in excel and email
 
Hi Alvin

If you use Excel 2002 or 2003 you can do it (there is a link in the Body examples)

For charts I add a example yesterday on my site to send it as a picture (2000 and higher)
http://www.rondebruin.nl/sendmail.htm



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



"Alvin Hansen" wrote in message ...
Hi
I have a macro there send a email made in html
so far so good its working. I take the values from a sheet in excel
but in this sheet there are also a picture, and in a html code the pictures
are a link to a souce file, is there someway to take the picture from the
sheet and put it in the html code whitout have the photo as a source file?
If i make a email in outlook i can put a picture into the email so maybe also
when i create this email from excel ??

Hope someone knows somthing about this

Regards alvin




Alvin Hansen[_2_]

Photos in excel and email
 
Thanks ron it's simply the best, and its working
But i have a problem¨
i use the one where i take a sheet into the body of the mail
it sworking also, but in the sheet i also have a macro there
only show one of the pictures in the sheet, its after a username
the macro is:
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("a53")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

When i use Mail_ActiveSheet_Body you have made i get an error in the macro
to the pictures. Off course i can write a if whre i don't use this macro but
then i daon't get the picture, maybe you know what to do ? I also have try
with a macro there copy the picture, but it dosn't come into the mail?

Best regards alvin



"Ron de Bruin" skrev:

Hi Alvin

If you use Excel 2002 or 2003 you can do it (there is a link in the Body examples)

For charts I add a example yesterday on my site to send it as a picture (2000 and higher)
http://www.rondebruin.nl/sendmail.htm



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



"Alvin Hansen" wrote in message ...
Hi
I have a macro there send a email made in html
so far so good its working. I take the values from a sheet in excel
but in this sheet there are also a picture, and in a html code the pictures
are a link to a souce file, is there someway to take the picture from the
sheet and put it in the html code whitout have the photo as a source file?
If i make a email in outlook i can put a picture into the email so maybe also
when i create this email from excel ??

Hope someone knows somthing about this

Regards alvin





Alvin Hansen[_2_]

Photos in excel and email
 
Hi ron
I use teh one you have to send a mail where the shett go into the body
of the mail -- but not the pictures i have trye with several sheets and names

do i something wrong here?

regards alvin


"Ron de Bruin" skrev:

Hi Alvin

If you use Excel 2002 or 2003 you can do it (there is a link in the Body examples)

For charts I add a example yesterday on my site to send it as a picture (2000 and higher)
http://www.rondebruin.nl/sendmail.htm



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



"Alvin Hansen" wrote in message ...
Hi
I have a macro there send a email made in html
so far so good its working. I take the values from a sheet in excel
but in this sheet there are also a picture, and in a html code the pictures
are a link to a souce file, is there someway to take the picture from the
sheet and put it in the html code whitout have the photo as a source file?
If i make a email in outlook i can put a picture into the email so maybe also
when i create this email from excel ??

Hope someone knows somthing about this

Regards alvin





Ron de Bruin

Photos in excel and email
 
Hi alvin

On that page you can read this

If you use Office 2002 or 2003 see this KB article.
How to Send a Range of Cells Using VBA. (with shapes)
http://support.microsoft.com/default...b;en-us;816644






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



"Alvin Hansen" wrote in message ...
Hi ron
I use teh one you have to send a mail where the shett go into the body
of the mail -- but not the pictures i have trye with several sheets and names

do i something wrong here?

regards alvin


"Ron de Bruin" skrev:

Hi Alvin

If you use Excel 2002 or 2003 you can do it (there is a link in the Body examples)

For charts I add a example yesterday on my site to send it as a picture (2000 and higher)
http://www.rondebruin.nl/sendmail.htm



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



"Alvin Hansen" wrote in message
...
Hi
I have a macro there send a email made in html
so far so good its working. I take the values from a sheet in excel
but in this sheet there are also a picture, and in a html code the pictures
are a link to a souce file, is there someway to take the picture from the
sheet and put it in the html code whitout have the photo as a source file?
If i make a email in outlook i can put a picture into the email so maybe also
when i create this email from excel ??

Hope someone knows somthing about this

Regards alvin







Alvin Hansen[_2_]

Photos in excel and email
 
Hi Ron
Thanks again
I use this:
Sub Send_Range()

' Select the range of cells on the active worksheet.
Sheets("email").Range("A1:n71").Select

' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True

' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With Asheets("print").MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "
.Item.Subject = "Booking usa"
.Item.Send
End With
But i can only get it to run if i open sheet "email" and then run the macro,
it will not work in my userform commanbutton???

Regards Alvin

"Ron de Bruin" skrev:

Hi alvin

On that page you can read this

If you use Office 2002 or 2003 see this KB article.
How to Send a Range of Cells Using VBA. (with shapes)
http://support.microsoft.com/default...b;en-us;816644






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



"Alvin Hansen" wrote in message ...
Hi ron
I use teh one you have to send a mail where the shett go into the body
of the mail -- but not the pictures i have trye with several sheets and names

do i something wrong here?

regards alvin


"Ron de Bruin" skrev:

Hi Alvin

If you use Excel 2002 or 2003 you can do it (there is a link in the Body examples)

For charts I add a example yesterday on my site to send it as a picture (2000 and higher)
http://www.rondebruin.nl/sendmail.htm



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



"Alvin Hansen" wrote in message
...
Hi
I have a macro there send a email made in html
so far so good its working. I take the values from a sheet in excel
but in this sheet there are also a picture, and in a html code the pictures
are a link to a souce file, is there someway to take the picture from the
sheet and put it in the html code whitout have the photo as a source file?
If i make a email in outlook i can put a picture into the email so maybe also
when i create this email from excel ??

Hope someone knows somthing about this

Regards alvin








Alvin Hansen[_2_]

Photos in excel and email
 
Hi Ron
i have done it with
sheet("email").activate
Then its working thanks for your help

Regards alvin


"Ron de Bruin" skrev:

Hi alvin

On that page you can read this

If you use Office 2002 or 2003 see this KB article.
How to Send a Range of Cells Using VBA. (with shapes)
http://support.microsoft.com/default...b;en-us;816644






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



"Alvin Hansen" wrote in message ...
Hi ron
I use teh one you have to send a mail where the shett go into the body
of the mail -- but not the pictures i have trye with several sheets and names

do i something wrong here?

regards alvin


"Ron de Bruin" skrev:

Hi Alvin

If you use Excel 2002 or 2003 you can do it (there is a link in the Body examples)

For charts I add a example yesterday on my site to send it as a picture (2000 and higher)
http://www.rondebruin.nl/sendmail.htm



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



"Alvin Hansen" wrote in message
...
Hi
I have a macro there send a email made in html
so far so good its working. I take the values from a sheet in excel
but in this sheet there are also a picture, and in a html code the pictures
are a link to a souce file, is there someway to take the picture from the
sheet and put it in the html code whitout have the photo as a source file?
If i make a email in outlook i can put a picture into the email so maybe also
when i create this email from excel ??

Hope someone knows somthing about this

Regards alvin









All times are GMT +1. The time now is 08:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com