Photos in excel and email

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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 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 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 = "(e-mail address removed)"
.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 Ron
i have done it with
sheet("email").activate
Then its working thanks for your help

Regards alvin


"Ron de Bruin" skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top