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
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