Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending mail with outlook

Status
Not open for further replies.

sophie19

Programmer
Jan 14, 2004
3
0
0
IL
hi i'm sophie
i'm a beginner in this field of programming
u'm tring to send e.mail in vb threw outlook 2000 using
shellexecute
my simple question is:
how can i break lines in the body of the text in outlook
and how can i make it right align
make spaces between the words
and change the font
(all in the code of the vb)
i know that there is something like "%0a%0d" to break lines
but i would like to get the whole list of things i can do

hope you can help me, it's very important
thanks ( :
 
I take it you mean a mailto string. A HTML encoded carriage return/line feed pair is %0D%0A. A space character is %20. You can't use HTML tags to format the text.

To get full control over formatting you should use the Outlook object model to create a HTML e-mail. You can set the HTMLBody property to a HTML formatted string.

Paul Bent
Northwind IT Systems
 
Try this thread: thread222-734914 Doesn't use outlook, but i have found it by far the easiest way to send mail.

Good luck

BB
 
Would this help?

Dim olapp As New Outlook.Application


Dim olMail As Outlook.MailItem
Dim Body_Message As String

Set olapp = CreateObject("Outlook.Application")

Body_Message = "PUT TEXT HERE" & VBCRLF & "MORE TEXT"

Set olMail = olapp.CreateItem(olMailItem)
olMail.Subject = "SUBJECT TEST"
olMail.To = &quot;<person1@wherever.COM>;<person2@wherever.COM>&quot;
olMail.body = Body_Message

olMail.Send
Set olMail = Nothing
Set olapp = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top