I have a simple macro that emails users and it works when Outlook is open, but when Outlook is closed I receive an error.
Run-Time Error '76':
Path not found.
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
'Working in Office 2000-2013
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"
On Error Resume Next
.To = "firstname.lastname@example.org"
' .CC = ""
' .BCC = ""
.Subject = "This is the Subject line"
.Body = strbody
.Send 'or use .Display
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing