Syntax for Pressing Enter

Ethereal

Warcraft III Player
Local time
Today, 03:25
Joined
Jan 17, 2006
Messages
99
Hi, I am attempting to auto generate an e-mail, but i am unsure of how to begin a new line in VBA syntax
so instead of

Joe Shmoe, This is an automated email from .....

I want

Joe Shmoe,

This is an automated email from ....

Does anybody know this syntax off hand ?
 
I use Outlook as my e-mail client. I prefer to use HTML format, althought the old school folks might prefer ASCII text messages.

Code:
Dim ouApp As New Outlook.Application
Dim MyMessage As Outlook.MailItem
Dim sToAddress As String, sSubjectLine As String, sBodyText As String

'Bunch of code here
sBodyText = "I" & <br> & "was" & <br> & "here"

If VBA.Len(sToAddress) Or VBA.Len(sCCAddress) Then
     With ouApp
           Set MyMessage = .CreateItem(ItemType:=olMailItem)
           With MyMessage
                .HTMLBody = sBodyText
                .To = sToAddress
                .CC = sCCAddress
                .Subject = sSubjectLine
                .Display Modal:=False
           End With
     End With
Else
        MsgBox "No e-mail notification was sent.  A valid e-mail address could not be found for the primary contact."
End If

If you are using plain text, you could use VBA.vblf to separate the lines.
 
Perfect, Thanks!
 

Users who are viewing this thread

Back
Top Bottom