Note: The other languages of the website are Google-translated. Back to English
English English

How to send email if due date has been met in Excel?

As shown in the screenshot below, if the due date in column C is less than or equal to 7 days (for example, the current date is 2017/9/13), an email is sent to the specified recipient in column A and the specified content in column B is dispalyed in the body of the email. How could you do to achieve it? This article provides a VBA code to help you accomplish this task.

Send email if due date has been met with VBA code


Send email if due date has been met with VBA code


Please do as follows to send an email reminder if the due date has been met in Excel.

1. Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, please click Insert > Module. Then copy and paste the below VBA code into the Module window.

VBA code: Send email if due date is closed in Excel

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 <= 7 And CDate(xRgDateVal) - Date > 0 Then
            xRgSendVal = xRgSend.Offset(i - 1).Value
            xMailSubject = xRgText.Offset(i - 1).Value & " on " & xRgDateVal
            vbCrLf = "<br><br>"
            xMailBody = "<HTML><BODY>"
            xMailBody = xMailBody & "Dear " & xRgSendVal & vbCrLf
            xMailBody = xMailBody & "Text : " & xRgText.Offset(i - 1).Value & vbCrLf
            xMailBody = xMailBody & "</BODY></HTML>"
            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

Notes: The line If CDate(xRgDateVal) - Date <= 7 And CDate(xRgDateVal) - Date > 0 Then in the VBA code means that the due date must be greater than 1 day and less than or equal to 7 days. You can change it as you need.

3. Press the F5 key to run the code. In the first popping up Kutools for Excel dialog box, please select the due date column range and then click the OK button. See screenshot:

4. Then the second Kutools for Excel dialog box pops up, please select the corresponding column range which contains the recipients’ email addresses, and click the OK button. See screenshot:

5. In the last Kutools for Excel dialog box, select the content you want to display in the email body, and then click the OK button.

Then an email will be created automatically with the specified recipient, subject and body listed out if the due date in column C is less than or equal to 7 days. Please click the Send button to send the email.

Notes:

1. Each created email is corresponding to a due date. For example, if there are three due dates meet the criteria, three email messages will be created automatically.

2. This code will not be triggered if there are no dates meet the criteria.

3. The VBA code is only working when you use Outlook as your email program.


Related articles:


The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (118)
Rated 4.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Thank you for sharing.


How would you add Cc inputs or multiple recipients?
This comment was minimized by the moderator on the site
Hi Brandon,

Sorry to comment on your post without an answer but were you able to get the VBA code to send an email?
This comment was minimized by the moderator on the site
I used your VBA code for sending emails based on a cell value but it doesn’t work.
Everything up until step 5 works but no email is sent. Can anyone help me with this?
This comment was minimized by the moderator on the site
Me viene muy bien gracias por el aporte, solo me falta como puedo hacerlo automaticamente sin necesidad de hacerlo manualmente el envio del correo.
This comment was minimized by the moderator on the site
This code froze my excel program when I ran it. Is it memory intensive?
This comment was minimized by the moderator on the site
Hi Robert,
The problem you mentioned does not appear in my case. May I have your Office version?
This comment was minimized by the moderator on the site
can we just input the details one time and the emails can be sent automatically, instead of always needing to select the columns?
This comment was minimized by the moderator on the site
Hi Diyaa,
If you don't want to manually select the columns, please apply the below VBA code.
Note: You onlyneed to select the due dates column after applying the code.

Public Sub CheckAndSendMail()
'Updated by Extendoffice 2017/9/14
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
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 = xRgDate.Offset(I - 1).Value
If CDate(xRgDateVal) - Date <= 7 And CDate(xRgDateVal) - Date > 0 Then
xRgSendVal = xRgSend.Offset(I - 1).Value
xMailSubject = xRgText.Offset(I - 1).Value & " on " & xRgDateVal
vbCrLf = "

"
xMailBody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2"
Set xMailItem = xOutApp.CreateItem(0)
With xMailItem
.To = "Email Address"
.CC = ""
.BCC = ""
.Subject = "send by cell value test"
.Body = xMailBody
.Display 'or use .Send
End With
Set xMailItem = Nothing
End If
Next
Set xOutApp = Nothing
End Sub
This comment was minimized by the moderator on the site
Hello,
I'm also pretty much of a beginner and I would like to ask another question for your great Sub.

How can I send an email only if a certain mail-adress is in the regarding cell?

I need this, because in my excel-tool i implemented some buttons for each person, who needs a reminder.

Thank you very much in advance!!

Thomas
This comment was minimized by the moderator on the site
Hi Thomas,
We have posted an article "How to send email to email addresses specified in cells in Excel?"
https://www.extendoffice.com/documents/excel/4717-excel-macro-send-email-to-address-in-cells.html
Maybe you can find your solution in this article.
This comment was minimized by the moderator on the site
I need this to work across all worksheets in a workbook the future date will be manually entered in the same cell on every sheet and new sheets are created daily. I also need the worksheet name in the email so I will know which sheet is due
This comment was minimized by the moderator on the site
Sorry can’t help you with this.
Welcome to post any question about Excel to our forum: https://www.extendoffice.com/forum.html. You will get more Excel supports from our professional or other Excel fans.
This comment was minimized by the moderator on the site
Dont get it working. Using Office 365 so Outlook and Excel should be tight enough. Like in the post from "schou" 4 monts ago, it works up to step 5 but then nothing.
A solution to this?
This comment was minimized by the moderator on the site
I have got excel to send the email, but can I set this so it sends an email every time I open up excel instead of selecting the columns each time.

I have a workbook with 24 pages so am looking to email automatically when the workbook is opened up.


Many thanks.
This comment was minimized by the moderator on the site
Hi,
Do you mean check for the due date automatically across the workbook and send email when the workbook is openned up?
This comment was minimized by the moderator on the site
Hi guys,


Macro is great but I would like to ask something - if you have someone on the list without any date how to modifiy the vba code to exclude that guy? Now the code generates e-mails even for the guys without any date.


Thanks!
This comment was minimized by the moderator on the site
Hi Lvan,
The code has been updated with the problem solving, please have a try. Thank you for your comment.
This comment was minimized by the moderator on the site
Hi, Mail is auto generating for columns with empty data. I too, would like to have the updated code.
This comment was minimized by the moderator on the site
Thank you very much for the contribution. I would like to know how to use fixed column selection without having to use kutools? that is, leave default columns of dates, receipts, and warnings?
This comment was minimized by the moderator on the site
Good day,
The below VBA code can help you. Please have a try.

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 = Range("C2:C4") 'Please reference the due date column
If xRgDate Is Nothing Then Exit Sub
Set xRgSend = Range("A2:A4") 'Please reference the recipients?email column
If xRgSend Is Nothing Then Exit Sub
Set xRgText = Range("B2:B4") Enter the column with reminded content in your email
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 <= 7 And 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
This comment was minimized by the moderator on the site
Dear Crytal,

Thank for your sharing.

I'm a beginner and I have a problem with code.

xMailBody = ""
xMailBody = xMailBody & "Dear " & xRgSendVal & vbCrLf
xMailBody = xMailBody & "Text : " & xRgText.Offset(i - 1).Value & vbCrLf
xMailBody = xMailBody & ""

The text is not go to new line.
Could you please help.

Thanks
This comment was minimized by the moderator on the site
Ni niti,
You need to add the line vbCrLf = "<br><br>" in front of the coldes.
Such as:
vbCrLf = "<br><br>"
xMailBody = ""
xMailBody = xMailBody & "Dear " & xRgSendVal & vbCrLf
xMailBody = xMailBody & "Text : " & xRgText.Offset(i - 1).Value & vbCrLf
xMailBody = xMailBody & ""
This comment was minimized by the moderator on the site
Dear Crystal, While selecting the dates column, Can multiple cells in different columns be selected?
This comment was minimized by the moderator on the site
Hello,
Mr. Crystal, in your last conversation with Mr. Ivan, he asked you for the code to send e-mail every time the spreadsheet is opened instead of entering the codes each time.
I need the same code, same situation, can you help please?
This comment was minimized by the moderator on the site
Correctly, it was not with Mr. Ivan, but with Mr. Austin.
Thank you.
This comment was minimized by the moderator on the site
Hi, I am using a modified version of this code, and I am rather new to VBA. I was curious if there was a possibility for when the email were to be sent, that the macro would be able to mark an X, or if someone had Complete, that an email would not send. I hope this all makes sense. Any help is very greatly appreciated.

Little background, I am using this tool to run a due date check at 30 days, 60 days, and overdue. I want 1 email to go out at 30 days, 1 at 60 days, and then overdue as well. I am running this off of a VB script I wrote, so that I could automate it daily. Thanks!
This comment was minimized by the moderator on the site
Hi, I am using a modified version of this code, and I am rather new to VBA. I was curious if there was a possibility for when the email were to be sent, that the macro would be able to mark an X, or if someone had Complete, that an email would not send. I hope this all makes sense. Any help is very greatly appreciated. Little background, I am using this tool to run a due date check at 30 days, 60 days, and overdue. I want 1 email to go out at 30 days, 1 at 60 days, and then overdue as well. I am running this off of a VB script I wrote, so that I could automate it daily. Thanks!
This comment was minimized by the moderator on the site
Hello Sir,

This is very much helpful. I need 2 more enhancement in the same codes. I have to click on send button every time, it is fine as long as I have 10 email to be sent, what if I >25 emails to be sent in a single day. So please give me a code to send e-mail automatically upon selecting Due date , Recipient, Subject etc.

Also please provide me with the code to add " CC" option as well


Thanks

Sounder P
This comment was minimized by the moderator on the site
Good day,
Please try the below VBA code, hope I can help. Thanks for commenting.

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 xRgCC = Application.InputBox("Please select the CC recipients?email column:", "KuTools For Excel", , , , , , 8)
If xRgCC 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 xRgCC = xRgCC(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 <= 7 And CDate(xRgDateVal) - Date > 0 Then
xRgSendVal = xRgSend.Offset(i - 1).Value
xRgCCVal = xRgCC.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
.Cc = xRgCCVal
.HTMLBody = xMailBody
.Send
End With
Set xMailItem = Nothing
End If
End If
Next
Set xOutApp = Nothing
End Sub
This comment was minimized by the moderator on the site
Hi Crystal,

Thanks for the codes as it is very much helpful. But how to make the code work if I'm using outlook.office.com?
This comment was minimized by the moderator on the site
in the body i want the column a,b,c value in a table format, like the expired date once reached in the body column i want to print a,b,c cells details in table format
This comment was minimized by the moderator on the site
Hi Dinesh B S,
Sorry can't help you with that. Welcome to post any question in our forum: https://www.extendoffice.com/forum.html.
This comment was minimized by the moderator on the site
Hello, I am new to VBA. Is there a way to have this program automatically run whenever the file is opened?
This comment was minimized by the moderator on the site
Hi L Echols,
For automatically running the code when the file is opened, please double click to open the ThisWorkbook code window (locates in the left side of the Microsoft Visual Basic for Applications window) , select Workbook from the first drop-down list, and then copy the above VBA code (except the first and the last line) into the code window and paste between the given two lines. See the below attached screenshot:
This comment was minimized by the moderator on the site
This is awesome. I was wondering if there is a way to run the code without having to select the KuTools values every time? For clarification, I inputted this code and now whenever I open the workbook I still have to highlight the same columns. Is there a way to input the code to run a check on the same columns every time - as long as no edits to workbook have been made - to run the check and formulate an email based off said check? Thank you in advance.
This comment was minimized by the moderator on the site
Hi Danny,
Please try the below code and change the ranges as you need.

Public Sub CheckAndSendMail()
'Updated by Extendoffice 2019/5/17
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 = Range("C2: C4")
If xRgDate Is Nothing Then Exit Sub
Set xRgSend = Range("A2: A4")
If xRgSend Is Nothing Then Exit Sub
Set xRgText = Range("B2:B4")
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 <= 7 And 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
This comment was minimized by the moderator on the site
This is awesome. I was wondering if there is a way to run the code without having to select the KuTools values every time? For clarification, I inputted this code and now whenever I open the workbook I still have to highlight the same columns. Is there a way to input the code to run a check on the same columns every time - as long as no edits to workbook have been made - to run the check and formulate an email based off said check? Thank you in advance.
This comment was minimized by the moderator on the site
Hello Crystal,
I'm having an issue with automatically sending email once file is opened. For instance, I have all due date info on Sheet1. However, if I save and close the file when I was working on Sheet2, as soon as I open the file, the values to send emails will be based on Sheet2 and not on Sheet1. I only have module added on Sheet1 and ThisWorkbook. I think having same vba on ThisWorkbook triggers to send automatic emails on whichever sheet I have it open at the moment. How can I restrict the VBA to pull value from specific sheet and also send emails when the file is opened? Thank you very much for your help in advance!
This comment was minimized by the moderator on the site
I am new to VBA. Is there a way to automatically run this program whenever the file is opened?
This comment was minimized by the moderator on the site
Yes, with


Private Sub Workbook_Open()
*Enter code here*
End Sub
This comment was minimized by the moderator on the site
Hi,

I have a question,

If I want to select a prederterminate range of cells, how could i modify the code in this part:

xLastRow = xRgDate.Rows.Count
Set xRgDate = xRgDate(1)

Toset automaticatly the cells?

Thank you :)
This comment was minimized by the moderator on the site
Hi,
If you don't want to manually select ranges every time when applying the code, please use the below code.

Public Sub CheckAndSendMail()
'Updated by Extendoffice 2019/12/10
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 = Range("C2: C4")
If xRgDate Is Nothing Then Exit Sub
Set xRgSend = Range("A2: A4")
If xRgSend Is Nothing Then Exit Sub
Set xRgText = Range("B2:B4")
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 <= 7 And 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
This comment was minimized by the moderator on the site
Buenos días! ¿que modificación tendría que realizar para dejar seleccionadas las celdas con la información de fecha, texto y correo y no tener que seleccionarlas cada vez que se activa la macro?

también me gustaría saber como introducir un CC, es decir, poder poner a otra persona en copia del correo. Gracias!
This comment was minimized by the moderator on the site
Hola! Pudiste solucionar esto? Estoy necesitando lo mismo.. gracias!
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations