Mr. Leith Ross help me with this application. I was trying to take a macro he encoded for me into HTML and duplicate it to another macro. However when I do it, mine comes out all jumbled...
Can someone please take a look and see what my issue is?? I appreciate the help!!!
Sub RouteCAR()
Dim OutApp As Object
Dim OutMail As Object
Dim strto As String, strcc As String, strbcc As String
Dim strsub As String, strbody As String
Dim wbName As String
Dim ext As String
Dim newFile As String, fName As String
Dim URL As String
URL = """file:///" & "S:\PROJECTS\Bakery Maint\Jason\CAR's Currently Routing"""
If MsgBox(" Are You Sure You Are Ready To The CAR?", vbYesNo) <> vbYes Then Exit Sub
Application.ScreenUpdating = False
Application.Run ("NotApplicable()")
ext = "S:\PROJECTS\Bakery Maint\Jason\CAR's Currently Routing\"
wbName = Sheets("Approvals").Range("A5").Value
ActiveWorkbook.SaveAs Filename:=ext & wbName
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strto = Range("F9").Value
strcc = ""
strbcc = ""
strsub = "CAR " & Range("A5").Value & " Is Ready For Your Initial Review"
strbody = "<p>Hi " & Range("B9").Value & ": " & Range("A9").Value & "</p><br>" _
& "<p>Capital Project: " & Range("A5").Value & " From " & Range("F3").Value & " Is Ready For Your Initial Review.</p>" _
& "<br><br><a href=" & URL & ">Click Here To Open</a>"
With OutMail
.To = strto
.CC = strcc
.BCC = strbcc
.Subject = strsub
.Body = strbody
'You can add a file to the mail like this
'.Attachments.Add ("C:\test.txt")
.Send ' or use .Display
End With
Set OutMail = Nothing
Set OutApp = Nothing
ThisWorkbook.Close savechanges:=True
End Sub
Bookmarks