If you frequently need to assign tasks to your subordinates, you may want to record each assigned task in an Excel workbook. Now, in this article, we will share you a method to let your Outlook auto undertake this mission.
Outlook not only permits us to create tasks for ourselves but also supports us to assign tasks to others. Usually, if you are a leader in a group or team, you may be required to assign tasks to the other teammates frequently. In this case, you may want to record these tasks in a specific Excel workbook. Now, in the followings, we will introduce a method which can save you from manually recording the task every time. It can let Outlook auto accomplish that.
Auto Record Each Assigned Task in an Excel Workbook
Here is the screenshot of a sample Excel workbook for recording the information of assigned tasks. The later operation and code is designed exclusively for it.
- For a start, launch Outlook.
- Then, get access to Outlook VBA editor by referring to “How to Run VBA Code in Your Outlook“.
- Next, in the VBA editor, activate “MS Excel Object Library” according to “How to Add an Object Library Reference in VBA“.
- Subsequently, put the following code into “ThisOutlookSession” project.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim objTaskRequest As Outlook.TaskRequestItem Dim objTask As Outlook.TaskItem Dim objRecipient As Outlook.Recipient Dim strRecipients As String Dim strSpecificExcelFile As String Dim objExcelApp As Excel.Application Dim objExcelWorkbook As Excel.Workbook Dim objExcelWorksheet As Excel.Worksheet Dim nNextEmptyRow As Integer If TypeOf Item Is TaskRequestItem Then Set objTaskRequest = Item Set objTask = objTaskRequest.GetAssociatedTask(True) For Each objRecipient In objTask.Recipients strRecipients = objRecipient.Address & "; " & strRecipients Next 'Change the path to the specific Excel workbook file path strSpecificExcelFile = "E:\Assigned Tasks.xlsx" Set objExcelApp = CreateObject("Excel.Application") Set objExcelWorkbook = objExcelApp.Workbooks.Open(strSpecificExcelFile) Set objExcelWorksheet = objExcelWorkbook.Worksheets(1) objExcelApp.Visible = True nNextEmptyRow = objExcelWorksheet.Range("A" & objExcelWorksheet.Rows.Count).End(xlUp).Row + 1 'Add the information based on your own sheet With objExcelWorksheet .Cells(nNextEmptyRow, 1) = objTask.Subject .Cells(nNextEmptyRow, 2) = Now() .Cells(nNextEmptyRow, 3) = objTask.StartDate .Cells(nNextEmptyRow, 4) = objTask.DueDate .Cells(nNextEmptyRow, 5) = strRecipients .Columns("A:E").AutoFit End With End If End Sub
- After that, exit the VBA editor.
- Eventually, you can have a try.
- Firstly, open or create a task.
- Then, click “Assign Task” and add recipients as per your needs.
- Next, click “Send” button.
- At once, the task will be sent.
- Also, the specific Excel workbook will be opened. And the assigned task has been recorded, as shown in the following image.
Never Give Up in Case of Outlook Corruption
When finding PST file inaccessible, multiple users will get worried and then try to utilize the inbox repair tool to repair the corrupt file. Then, if the built-in utility fails, users will give up and regret not backing up their data. As a matter of fact, in such a situation, you ought to calm down and don’t be desperate. You can just ask professional recovery services or resort to more robust PST fix software, such as DataNumen Outlook Repair. In a nutshell, do not give up and trust in the magic of data recovery.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupt sql and outlook repair software products. For more information visit www.datanumen.com