Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   email layout (http://www.outlookbanter.com/outlook-vba/50525-email-layout.html)

Andrea June 15th 07 11:43 AM

email layout
 
Hello to everybody,
I already posted my question in excel section, but I didn't find a solution
for my problem.
I try to post it again in outlook section, thinking it could be a more
specific question regarding this application.
So, in my everyday job I need to send an excel report to my company Directors.
Inside this site http://www.rondebruin.nl/sendmail.htm I found some
excellent VBA steps that help to me enough. But I have a particular necessity
I didn't find a solution there.
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 = "
.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

Sue Mosher [MVP-Outlook] June 15th 07 03:09 PM

email layout
 
Please give your Outlook version. That is almost always relevant to the solution.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Andrea" wrote in message ...
Hello to everybody,
I already posted my question in excel section, but I didn't find a solution
for my problem.
I try to post it again in outlook section, thinking it could be a more
specific question regarding this application.
So, in my everyday job I need to send an excel report to my company Directors.
Inside this site http://www.rondebruin.nl/sendmail.htm I found some
excellent VBA steps that help to me enough. But I have a particular necessity
I didn't find a solution there.
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 = "
.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


[email protected] June 16th 07 06:24 PM

email layout
 

Sue Mosher [MVP-Outlook] ha scritto:

Please give your Outlook version. That is almost always relevant to the solution.


Andrea



CIao andrea,

scusami ma ho il tuo stesso problema che avevi qua:
http://groups.google.com/group/micro...9706af61479288

Alla fine te l'hai risolto???????
Mi puoi dire come hai fatto per piacere???

grazie


Andrea June 18th 07 01:30 PM

email layout
 
Hi Sue,
My Outlook version is 2002 (SP3)
Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

Please give your Outlook version. That is almost always relevant to the solution.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Andrea" wrote in message ...
Hello to everybody,
I already posted my question in excel section, but I didn't find a solution
for my problem.
I try to post it again in outlook section, thinking it could be a more
specific question regarding this application.
So, in my everyday job I need to send an excel report to my company Directors.
Inside this site http://www.rondebruin.nl/sendmail.htm I found some
excellent VBA steps that help to me enough. But I have a particular necessity
I didn't find a solution there.
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 = "
.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



Andrea June 18th 07 01:32 PM

email layout
 
Ciao Luca,
Mi piacerebbe poterti aiutare ma non sono io l'Andrea di quel topic.
Ciao.


" wrote:


Sue Mosher [MVP-Outlook] ha scritto:

Please give your Outlook version. That is almost always relevant to the solution.


Andrea



CIao andrea,

scusami ma ho il tuo stesso problema che avevi qua:
http://groups.google.com/group/micro...9706af61479288

Alla fine te l'hai risolto???????
Mi puoi dire come hai fatto per piacere???

grazie



Sue Mosher [MVP-Outlook] June 18th 07 05:31 PM

email layout
 
An attachment can be placed inline in the message body only if the message body is rich-text format. When you create the message set the BodyFormat property appropriately, i.e. to olFormatRichText. Then, when you use Attachments.Add to add the attachment, set the third argument, Position, to the desired location in the message. You may need to experiment a bit to get it exactly right. The Instr() function should be helpful in locating particular points in the text.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Andrea" wrote in message ...

My Outlook version is 2002 (SP3)
So, in my everyday job I need to send an excel report to my company Directors.
Inside this site http://www.rondebruin.nl/sendmail.htm I found some
excellent VBA steps that help to me enough. But I have a particular necessity
I didn't find a solution there.
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 = "
.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




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

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com