Have you ever wanted to create a new follow-up task on basis of an existing one? There is no doubt that manually creating is a bit cumbersome. Why not resort to Outlook VBA? This article will guide you how to achieve it.
Sometimes, for some reasons, such as after receiving a task from others, you may desire to create another one based on this task for follow up. Generally speaking, the only way for those who have no knowledge about VBA is to manually create a new one from the existing one. There is no denying that this means can be rather time-consuming. However, with the help of Outlook VBA, it will be far more convenient. Here are the detailed operations including the VBA codes.
Create a New Follow-up Task Based on an Existing One
- In the first place, you ought to launch Outlook.
- Then switch to “Developer” tab and hit the “Visual Basic” button.
- Next in the VBA editor window, you need to open a new module and then copy the following codes into it.
Sub CreateNewTaskBasedonExistingOne() Dim olTask As TaskItem Dim desFolder As Folder Dim newTask As TaskItem Select Case TypeName(Application.ActiveWindow) Case "Inspector" Set olTask = ActiveInspector.CurrentItem Case "Explorer" Set olTask = ActiveExplorer.Selection.Item(1) End Select If TypeOf olTask Is TaskItem Then 'Specify the destination folder for the new task Set desFolder = Application.Session.GetDefaultFolder(olFolderTasks).Folders("Test") Set newTask = desFolder.Items.Add("IPM.Task") 'If you want to save the new task in the default task folder 'Directly use "Set newTask = Outlook.Application.CreateItem(olTask)" With newTask 'You can change the new task details as per your actual needs .Subject = olTask.Subject & " (New for follow-up)" .StartDate = Now .DueDate = Now + 5 .Body = olTask.Body .Attachments.Add olTask .Display End With End If End Sub
- After that, you can proceed to add the new VBA project to the Quick Access Toolbar or ribbon. Here we take the Quick Access Toolbar as an instance.
- At first, go to “File” > “Options” > “Quick Access Toolbar”.
- Then follow the steps shown in the image below to complete it.
- Eventually, after backing to the main Outlook window, turn to the Tasks pane.
- Firstly, you should find and pitch on the source task item.
- And then click the macro button in Quick Access Toolbar.
- Lastly, a new follow-up task will display, like the screenshot below:
Outlook Can Get Damaged Now and Then
Although Outlook earns a lot of kudos due to its many functions, it still cannot be immune from corruption. If you’ve used Outlook for decades, then you will find that Outlook PST mail damage is pretty common. Thereby, it is prudent to procure a potent repair tool, such as DataNumen Outlook Repair, so that you can get help as soon as meeting up with the annoying issues.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair corrupted SQL Server mdf file and outlook repair software products. For more information visit www.datanumen.com