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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i have more than 1 line in the body of an email

DJ2012

Programmer
Mar 13, 2025
1
here is a copy of my VBA
Private Sub VerbalWarning_Click()
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
On Error Resume Next
'see if Outlook is running and if so turn your attention there
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then 'Outlook isn't running
'So fire it up
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
'Open a new e-mail message
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem 'and add the detail to it
.To = 'send to this address
.CC = [GroupEmail]
.BCC = "XXXXXX Removed for Security resons XXXXXX"
.Subject = [FullName] & " - " & "VERBAL WARNING" 'This is the message subject
.Body = "Good Day,"
" "

"Please let this Email serve as a verbal warning"' This is the message body text

.Display
End With
If bStarted Then 'If the macro started Outlook, stop it again.
oOutlookApp.Quit
End If
'Clean up
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
 
Last edited:
Umm... I'm not sure; it has been a while, but...

.Body = "Good Day," & vbNewLine 'or chr(10) & chr(13)


Strongm should be along to correct me if I am wrong
 

Part and Inventory Search

Sponsor

Back
Top