如何通过电子邮件正文中的超链接从Excel发送电子邮件?

您所在的位置:网站首页 邮件设置超链接单击打开 如何通过电子邮件正文中的超链接从Excel发送电子邮件?

如何通过电子邮件正文中的超链接从Excel发送电子邮件?

2023-12-17 15:11| 来源: 网络整理| 查看: 265

Does anyone know how to combine/ add this with a code I am already using to send an email? The one bellow?

Public Sub CheckAndSendMail() 'Updated by Extendoffice 2018/11/22 Dim xRgDate As Range Dim xRgSend As Range Dim xRgText As Range Dim xRgDone As Range Dim xOutApp As Object Dim xMailItem As Object Dim xLastRow As Long Dim vbCrLf As String Dim xMailBody As String Dim xRgDateVal As String Dim xRgSendVal As String Dim xMailSubject As String Dim i As Long On Error Resume Next Set xRgDate = Application.InputBox("Please select the due date column:", "KuTools For Excel", , , , , , 8) If xRgDate Is Nothing Then Exit Sub Set xRgSend = Application.InputBox("Please select the recipients?email column:", "KuTools For Excel", , , , , , 8) If xRgSend Is Nothing Then Exit Sub Set xRgText = Application.InputBox("Select the column with reminded content in your email:", "KuTools For Excel", , , , , , 8) If xRgText Is Nothing Then Exit Sub xLastRow = xRgDate.Rows.count Set xRgDate = xRgDate(1) Set xRgSend = xRgSend(1) Set xRgText = xRgText(1) Set xOutApp = CreateObject("Outlook.Application") For i = 1 To xLastRow xRgDateVal = "" xRgDateVal = xRgDate.Offset(i - 1).Value If xRgDateVal "" Then If CDate(xRgDateVal) - Date 0 Then xRgSendVal = xRgSend.Offset(i - 1).Value xMailSubject = xRgText.Offset(i - 1).Value & " on " & xRgDateVal vbCrLf = "" xMailBody = "" xMailBody = xMailBody & "Dear " & xRgSendVal & vbCrLf xMailBody = xMailBody & "Text : " & xRgText.Offset(i - 1).Value & vbCrLf xMailBody = xMailBody & "" Set xMailItem = xOutApp.CreateItem(0) With xMailItem .Subject = xMailSubject .To = xRgSendVal .HTMLBody = xMailBody .Display '.Send End With Set xMailItem = Nothing End If End If Next Set xOutApp = Nothing End Sub



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3