bamaisgreat
Well-known Member
- Joined
- Jan 23, 2012
- Messages
- 831
- Office Version
- 365
- Platform
- Windows
I was trying to add a couple line in the code below to have a link that would take someone to the file location. I have the problem area highlighted in Red. I cant seem to get the info entered without an error.
Code:
Sub REVISED_REQ()
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
'Working in Excel 2000-2016
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
If ActiveWorkbook.Path <> "" Then
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<font size=""3"" face=""Calibri"">" & _
"Joe,<br><br>" & _
"See link to " & ActiveWorkbook.Name & _
" revised req below.<br>" & _
" " & _
"<A HREF=""file://" & ActiveWorkbook.FullName & _
""">Link to the req</A>" & _
"<br><br>Thanks," & _
"<br><br>Jamey</font>"
[COLOR=#ff0000] "<br><br>Click link below for file location" & _[/COLOR]
[COLOR=#ff0000] "Application.ActiveWorkbook.Path[/COLOR]
On Error Resume Next
With OutMail
.To = "jgpiller@oosteel.com"
.CC = ""
.BCC = ""
.Subject = "Revised Req# " & ActiveWorkbook.Name
.HTMLBody = strbody
.Display 'or use .Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Else
MsgBox "The ActiveWorkbook does not have a path, Save the file first."
End If
End Sub
Last edited: