Excel Email Macro with Hyperlink Help

DIYbob21

New Member
Joined
Jan 31, 2018
Messages
6
Hi everyone, hew to the board here and I'm in need of some assistance.

I have a macro built in excel to send out an email and I have my template and everything set up, but I'm having issues with the hyperlink functionality. I can get it to point to a specific location (ex. C\Files\Folder1\Subfolder1), but I'm looking to have "Folder1" and "Subfolder1" be values in cells on my spreadsheet.

Can anyone help with the below code?? I've highlighted the 3 difference sections that I need to point to 3 difference cells on this spreadsheet.

Thanks in advance!

Sub Mail_Outlook()
Dim OutApp As Object
Dim OutMail As Object


LastRow = CLng(InputBox("Row"))

If Cells(LastRow, 1).Value <> "" Then

MailTo = Cells(LastRow, 1).Value



MailSubject = Cells(LastRow, 1).Offset(0, 11).Value & "CHECKER - " & Cells(LastRow, 1).Offset(0, 5).Value & " - " & Cells(LastRow, 1).Offset(0, 6).Value & " - ERNIE ID: " & Cells(LastRow, 1).Offset(0, 7).Value






'Send Mail
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(o)
With OutMail
.Subject = MailSubject
.To = MailTo
.HTMLBody = "Hi " & Cells(LastRow, 1).Offset(0, 1).Value & "," & "<br />" & "<br />" & _
"You're up next on the checker sheet. " & "This is a " & Cells(LastRow, 1).Offset(0, 4).Value & ", " & Cells(LastRow, 1).Offset(0, 3).Value & "<a href=""\\MIDP-SFS-113\MidAtlNB\Mid Atlantic Key\2018\07-01"">case </a>. " & "Please return this group to me by " & Cells(LastRow, 1).Offset(0, 10).Value & "." & _
"<br />" & "<br />" & "Thanks," & "<br />" & "<br />" & Cells(LastRow, 1).Offset(0, 8).Value
'.Attachments.Add FileNme
.Display
'.Send
End With

Set OutMail = Nothing
Set OutApp = Nothing
End If

End Sub
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,215,398
Messages
6,124,688
Members
449,179
Latest member
kfhw720

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top