A
Andrea
Hello to everybody
In my everyday job I need to send an excel report to my company Directors.
Reading previous posts, I arrived here
http://www.rondebruin.nl/sendmail.htm and I found some excellent VBA steps
that help to me. But I have a particular necessity I didn't find there. I
explain myself
I made these lines
Sub create_email()
Dim OutApp As Object: Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.display
.To = "(e-mail address removed);[email protected]"
.CC = ""
.BCC = ""
.Subject = "daily report"
.body = "today feature"
.body = "1. xxxxxx "
.body = "2. yyyyyy "
.Attachments.Add ("C:\mydoc\daily report.xls")
.Send
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
running program as above written, I found attachement file icon at the top
side of email body, showed before the pre-formatted text ("1. xxxxxx ", "2.
yyyyyy ").
Unfortuantely I need that email layout must be like this:
_______________
1. xxxxxx (and eventually with indented point)
2. yyyyyy (and eventually with indented point)
icon file
greetings
_______________
I try to move .body before or after .attachments.add command, but the result
is always the same.
I hope to have well explained my problem and that someone can help to me.
Thanks.
Andrea.
In my everyday job I need to send an excel report to my company Directors.
Reading previous posts, I arrived here
http://www.rondebruin.nl/sendmail.htm and I found some excellent VBA steps
that help to me. But I have a particular necessity I didn't find there. I
explain myself
I made these lines
Sub create_email()
Dim OutApp As Object: Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.display
.To = "(e-mail address removed);[email protected]"
.CC = ""
.BCC = ""
.Subject = "daily report"
.body = "today feature"
.body = "1. xxxxxx "
.body = "2. yyyyyy "
.Attachments.Add ("C:\mydoc\daily report.xls")
.Send
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
running program as above written, I found attachement file icon at the top
side of email body, showed before the pre-formatted text ("1. xxxxxx ", "2.
yyyyyy ").
Unfortuantely I need that email layout must be like this:
_______________
1. xxxxxx (and eventually with indented point)
2. yyyyyy (and eventually with indented point)
icon file
greetings
_______________
I try to move .body before or after .attachments.add command, but the result
is always the same.
I hope to have well explained my problem and that someone can help to me.
Thanks.
Andrea.