Hi All, Hope this is a quick one for someone,
I am using the below macro to attach the active sheet (excel) to an email, however not in HTML format,
is this something that can be tweaked ?
Public Sub Sendmail()
Dim OApp As Object, OMail As Object, signature As String
Set OApp = CreateObject("Outlook.Application")
Set OMail = OApp.CreateItem(0)
With OMail
.Display
End With
signature = OMail.body
With OMail
'.To = "someone@somedomain.com"
'.Subject = "Type your email subject here"
'.Attachments.Add
.body = "Add body text here" & vbNewLine & signature
'adding current file
.Attachments.Add ActiveWorkbook.FullName
'.Send
End With
Set OMail = Nothing
Set OApp = Nothing
End Sub
I am using the below macro to attach the active sheet (excel) to an email, however not in HTML format,
is this something that can be tweaked ?
Public Sub Sendmail()
Dim OApp As Object, OMail As Object, signature As String
Set OApp = CreateObject("Outlook.Application")
Set OMail = OApp.CreateItem(0)
With OMail
.Display
End With
signature = OMail.body
With OMail
'.To = "someone@somedomain.com"
'.Subject = "Type your email subject here"
'.Attachments.Add
.body = "Add body text here" & vbNewLine & signature
'adding current file
.Attachments.Add ActiveWorkbook.FullName
'.Send
End With
Set OMail = Nothing
Set OApp = Nothing
End Sub