ayushkumar
New Member
- Joined
- Jul 12, 2013
- Messages
- 3
Hello Team,</SPAN>
I am a new user to this site and to the VBA too. I joined recently to this site in July. I need your quick help on one of the projects I am working upon but I am stuck at a point where your expertise would matter.</SPAN>
I am currently an Assistant Manager at an organization where we use Excel documents at a full fledge. All reporting and statistics are presented using Excel.</SPAN>
I have a file 1 which is a master file and have around 25 columns of data. There is another file 2 which has 5 columns and gets input from the file 1 based on vlookup formula. I update the file 1 on regular intervals in a day and hence the file 2 gets updated through the vlookup formula. Now all I want is that every day, at two intervals say the mid of the day and end of the day, an automated trigger email should be sent to a recipient which will have the file 2 attached in that email. The macro should do this automatically at the particular time mentioned for a day. </SPAN>
I have written the following code and need your help in editing it to make it automated to be sent at a particular time of a day:</SPAN>
----------------</SPAN>
Sub example()</SPAN>
Dim OutApp As Object</SPAN>
Dim OutMail As Object</SPAN>
Set OutApp = CreateObject("Outlook.Application")</SPAN>
Set OutMail = OutApp.CreateItem(0)</SPAN>
On Error Resume Next</SPAN>
With OutMail</SPAN>
.to = "zzzzzz@xxx.com"</SPAN>
.CC = "yyyyyyyy@xxx.com"</SPAN>
.BCC = ""</SPAN>
.Subject = "STATUS REPORT"</SPAN>
.Body = "Hello Ayush, Here is the update on the reports"</SPAN>
.Attachments.Add ("file_path")</SPAN>
.Display</SPAN>
End With`</SPAN>
On Error GoTo 0</SPAN>
Set OutMail = Nothing</SPAN>
Set OutApp = Nothing</SPAN>
End Sub</SPAN>
-----</SPAN>
Many thanks for looking into this abrupt request.</SPAN>
Regards,</SPAN>
Ayush</SPAN>
I am a new user to this site and to the VBA too. I joined recently to this site in July. I need your quick help on one of the projects I am working upon but I am stuck at a point where your expertise would matter.</SPAN>
I am currently an Assistant Manager at an organization where we use Excel documents at a full fledge. All reporting and statistics are presented using Excel.</SPAN>
I have a file 1 which is a master file and have around 25 columns of data. There is another file 2 which has 5 columns and gets input from the file 1 based on vlookup formula. I update the file 1 on regular intervals in a day and hence the file 2 gets updated through the vlookup formula. Now all I want is that every day, at two intervals say the mid of the day and end of the day, an automated trigger email should be sent to a recipient which will have the file 2 attached in that email. The macro should do this automatically at the particular time mentioned for a day. </SPAN>
I have written the following code and need your help in editing it to make it automated to be sent at a particular time of a day:</SPAN>
----------------</SPAN>
Sub example()</SPAN>
Dim OutApp As Object</SPAN>
Dim OutMail As Object</SPAN>
Set OutApp = CreateObject("Outlook.Application")</SPAN>
Set OutMail = OutApp.CreateItem(0)</SPAN>
On Error Resume Next</SPAN>
With OutMail</SPAN>
.to = "zzzzzz@xxx.com"</SPAN>
.CC = "yyyyyyyy@xxx.com"</SPAN>
.BCC = ""</SPAN>
.Subject = "STATUS REPORT"</SPAN>
.Body = "Hello Ayush, Here is the update on the reports"</SPAN>
.Attachments.Add ("file_path")</SPAN>
.Display</SPAN>
End With`</SPAN>
On Error GoTo 0</SPAN>
Set OutMail = Nothing</SPAN>
Set OutApp = Nothing</SPAN>
End Sub</SPAN>
-----</SPAN>
Many thanks for looking into this abrupt request.</SPAN>
Regards,</SPAN>
Ayush</SPAN>