Hi All,
Got a quick question, I'm using the following code to send emails to people:
I'd like to add a hyperlink in the emails to the respective files but not sure how to do this.
Example: It sends out an email and the ECO# is 201, so it would link the following file: N:\ENGINEERING\ECO\201\201.xlsm
Please keep in mind that the 201 in both links will vary as it increase, so the next one would be 202 and your link would be N:\ENGINEERING\ECO\202\202.xlsm
Any and all help would be appreciated. Thank you in advance!
Got a quick question, I'm using the following code to send emails to people:
Code:
Sub Email_Notification()'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
'Working in Office 2000-2016
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Dim strto As String
For Each cell In ThisWorkbook.Sheets("Settings").Range("C11:C17")
If cell.Value Like "?*@?*.?*" Then
strto = strto & cell.Value & ";"
End If
Next cell
If Len(strto) > 0 Then strto = Left(strto, Len(strto) - 1)
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
For Each cell In Columns("O").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" And _
LCase(Cells(cell.Row, "F").Value) = "x" _
And LCase(Cells(cell.Row, "N").Value) <> "notified" Then
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = strto 'cell.Value
.Subject = "ECO No. " & Cells(cell.Row, "A").Value & " Closed"
.Body = "Dear All," _
& vbNewLine & vbNewLine & _
"The following drawings have been released for closure:" & _
vbNewLine & vbNewLine & _
Cells(cell.Row, "C").Value
'You can add files also like this
'.Attachments.Add ("C:\test.txt")
.Display 'Or use Send
End With
On Error GoTo 0
Cells(cell.Row, "N").Value = "Notified"
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub
I'd like to add a hyperlink in the emails to the respective files but not sure how to do this.
Example: It sends out an email and the ECO# is 201, so it would link the following file: N:\ENGINEERING\ECO\201\201.xlsm
Please keep in mind that the 201 in both links will vary as it increase, so the next one would be 202 and your link would be N:\ENGINEERING\ECO\202\202.xlsm
Any and all help would be appreciated. Thank you in advance!