Dim OutApp As Object Dim OutMail As Object Dim strbody As String Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) strbody = managername & "," & vbNewLine & vbNewLine & _ "Data has been dumped from the survey controller on project number " & newjob & ". The name of the file is: " & vbNewLine & vbNewLine & _ filefromname & vbNewLine & vbNewLine & _ "and it is located in the following folder:" & vbNewLine & vbNewLine & _ "<a href=""<file:///" & GetFolder & ">"">" & GetFolder & "</a>" & vbNewLine & vbNewLine & _ "Comments:" & vbNewLine & surveynotes MsgBox strbody On Error Resume Next With OutMail .To = manageremail .Subject = "Some survey points have been downloaded on one of your projects" .Body = strbody 'You can add a file like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.