View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pieter Pieter is offline
external usenet poster
 
Posts: 23
Default send sheet to email as html attachment

Hello Readers,

I use the following working code (thanks to ron de bruin) :

Sub Mail_Loadingorder()
Dim OutApp As Object
Dim OutMail As Object
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = ThisWorkbook.Sheets("Loadingorder").Range("a1").Va lue
.CC = ""
.BCC = ""
.Subject = "Loadingorder " & Sheets("Loadingorder").Range("h2").Value
.HTMLBody = SheetToHTML(ActiveSheet)
.Send 'or use .Display
End With
Application.ScreenUpdating = True
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


Now i want to change this to attach the sheet as an html attachment instead
of the
the sheet is standing in the body.

Anyone know this solution..

Greetings