Need help on vba macro to send email auto for multiple dates and to use default outlook signature

Deepak1685

New Member
Joined
Jun 29, 2019
Messages
1
Hello Team,

Kindly help on with below VBA Codes which needs to select multiple date range and to include default outlook signature

There 2 chaser in column b & c, both the date are same but will have different attachment. Based on column A date chasers to send email automatically


[TABLE="width: 183"]
<colgroup><col width="116" style="width: 87pt; mso-width-source: userset; mso-width-alt: 4242;"> <col width="64" style="width: 48pt;" span="2"> <tbody>[TR]
[TD="width: 116, bgcolor: transparent"]A[/TD]
[TD="width: 64, bgcolor: transparent"]B[/TD]
[TD="width: 64, bgcolor: transparent"]C[/TD]
[/TR]
[TR]
[TD="bgcolor: #BDD7EE"]Mismatch date[/TD]
[TD="bgcolor: #BDD7EE"]Chaser 1[/TD]
[TD="bgcolor: #BDD7EE"]Chaser 2 [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]6/29/19 7:09 AM[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]6/29/19 5:44 AM[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]6/29/19 5:45 AM[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[/TR]
</tbody>[/TABLE]


Sub email()
Dim myOutlook As Object
Dim myMailItem As Object
Dim FName As String
Set otlApp = CreateObject("Outlook.Application")
Set otlNewMail = otlApp.CreateItem(olMailItem)
FName = ActiveWorkbook.Path & "" & ActiveWorkbook.Name
With otlNewMail
.To = ""
.cc = ""
.Subject = "Test"
.Body = "Test"
.Attachments.Add ("H:\jpmDesk\Desktop\0806.txt")
.DeferredDeliveryTime = Range("A1") (Here need the code to select multiple date range)
.send

End With

Set otlNewMail = Nothing
Set otlApp = Nothing
Set otlAttach = Nothing
Set otlMess = Nothing
Set otlNSpace = Nothing
End Sub
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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