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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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