Using the coup to let Outlook automatically update the mail regularly

  
People who work in large organizations know that in order to release the daily report, you need to manually send the mail, and it is necessary to customize an automatic transmission plan. The following system home Xiaobian will introduce you how to let Outlook automatically update the mail. At work, some friends need to send an email with attachments every day, such as daily reports, files, etc. These files are updated every day, but the regular delivery in the mail client software can only take effect once. And the e-mail attachment can not be automatically updated regularly. This problem is quite tricky. The existing mail program and network mailbox do not have this function. After the attachment is added, it cannot be synchronized with the original file. In fact, to achieve this purpose, you can do it through Outlook and scheduled tasks. The specific method is as follows: Create an automatic program code to start Outlook2010, press Alt+F11 to start the VBA editor, click ThisOutlookSession on the left side of the code window, and then enter the following code in the code window on the right (Figure 1): Sub Application_Startup( )Set oApp = Outlook.ApplicationSet oMessage = oApp.CreateItem(olMailItem)oMessage.To = "[email protected] "oMessage.Subject = "daily report"oMessage.Attachments.Add ("E:\\ New Folder\\Daily Report.xls ")oMessage.SendSet oMessage = NothingSet oApp = NothingEnd Sub The above code is oMessage.To = followed by the recipient address, oMessage.Subject = refers to the message header, and oMessage. Attachments.Add refers to the path of the attached attachment file. After the input is completed and the check is correct, click the “Save” button to close Outlook. The purpose of this code is to create a new email when you start Outlook, automatically add attachments, and send this email. Develop an automatic send task execution & ldquo; start & rarr; program & rarr; system tool & rarr; task plan & rdquo; command, select & ldquo; add plan task & rdquo;, then click & ldquo; next & rdquo;, in the pop-up task plan wizard program In the list, select Microsoft Outlook 2010, and in the wizard dialog box that pops up, select the cycle to perform this task, such as "Daily", click the "Next" button (Figure 2), the dialog that pops up Set the start time and date in the box, such as 16:30, click the “Next” button. Then in the pop-up username and password settings dialog box, enter the username and password you have logged into the machine (you must enter it, otherwise you will not be able to run the mission plan) (Figure 3), click “Next”, and finally click “Complete & rdquo; button. This way, emails with attachments are automatically sent to the designated mailbox on Fridays every week. It should be noted that if the task scheduler in the service is not running, the error will be prompted when running the task plan set above. At this time, you can execute “start →program →management tools →service” The Task Scheduler is set to “automatic", and then it can be started.  
Copyright © Windows knowledge All Rights Reserved