Kimberly: don't worry, everybody's green in the beginning.
Automation sounds scary, but it isn't. Actually, it's quite simple. It means 'opening' an application from your program and then using that application's objects and methods to force it do what you want. The bad thing is that you can only use applications that expose themselves as objects. You can use Outlook, CDO, EasyMail, but not Outlook Express, Netscape Messenger and the like.
In our case, the 'remote' application would be Outlook.
Here's the replacement of your code (paste the function in a module:
'============Code Start=======================
Function fSendMail(EmailAddress, SubjectLine, BodyText)
Dim objOutlook As Object
Dim objMailItem As Object
'Open Outlook if it isn't already open
Set objOutlook = CreateObject("Outlook.Application"
'create a mail message in Outlook
Set objMailItem = objOutlook.CreateItem(0)
'Now set mail message attributes:
With objMailItem
.To = EmailAddress
.Subject = SubjectLine
.Body = BodyText
.Send
End With
'Now close objects and cleanup
Set objMailItem = Nothing
Set objOutlook = Nothing
End Function
'===========Code End=================
Instead of your old code, place this:
Dim strEmailAddr As String
Dim strSubject As String
Dim strBody As String
strEmailAddr = RequestorEmail
strSubject = "Response to ECR"
strBody = "Dear " & RequestorName & "," & _
vbCrLf & vbCrLf & _
TextFileToString_FX(GetDBPath_FX & "ECR reply.txt"

_
& vbCrLf & "Model(s): " & Models & "with your concern being: " & ReasonCode & _
". You have supplied the following description of the problem: " & Description & "." & vbCrLf _
& vbCrLf & "Regards," & vbCrLf & vbCrLf & "name" & vbCrLf _
& "title" & vbCrLf & "company" & vbCrLf _
& "location" & vbCrLf
Call fSendMail(strEmailAddr, strSubject, strBody)
Good luck
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
Daniel Vlas
Systems Consultant