You can use Visual Basic Script and the recurrence settings of a task to automatically generate a recurring e-mail message. This procedure consists of the following tasks:
- Publish a custom task form that creates an e-mail message when the task status equals completed.
- Use the custom task form to create a recurring task.
- When the task comes due, mark it as completed. The code will generate the boilerplate message, which you then send. At the same time, a new task is created because the original task was set to recur.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:
Microsoft Certified Partners - https://partner.microsoft.com/global/30000104
Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice
For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
Publish a Custom Task Form
- Start Outlook and open your Tasks folder.
- On the Actions menu, click New Task.
- On the Tools menu, point to Forms, and then click Design This Form.
- On the Form menu, click View Code, and type the following code in the Script Editor:
Sub Item_PropertyChange(ByVal Name)
Select Case Name
if Item.Status = 2 then '2 = Completed
Set NewItem = Application.CreateItem(0)
NewItem.To = "firstname.lastname@example.org"
NewItem.Subject = "This is the message subject text"
NewItem.Body = "This is text that will appear in the body of the message."
- In the Script Editor, on the File menu, click Close.
- On the Tools menu, point to Forms, and then click Publish Form.
- In the Look in list, click Tasks. In the Display Name and Form Name boxes, type Reminder, and then click Publish.
- On the File menu, click Close. Do not save changes.
Create a Recurring Task Using the Custom Form
- Open your Tasks folder, where you published the custom reminder form.
- On the Actions menu, click New Reminder. This will open a new task based on your custom form.
- Type a subject for your reminder task. In Due Date, click to select a due date from the calendar. Click to select the Reminder check box.
- On the Actions menu, click Recurrence, and set how often you want the reminder message sent.
- Click Save and Close.
To Send Reminder E-mailWhen you receive the reminder that the task is due, click Open Item. In the Status box, click to select Completed.
Dismiss the reminder and in your Tasks list, click Completed.
Setting the task as completed will automatically generate a new task and display an e-mail message containing your boilerplate text. Click Send to send the message.
You can further automate the message. If you add the line NewItem.Send immediately below the NewItem.Display line, the message is automatically sent when you mark the task as completed.
Note In Microsoft Outlook 2002, after you click Completed in the Status box, you receive the following message: Click Yes to send the message.
ID d'article : 239087 - Dernière mise à jour : 13 juil. 2009 - Révision : 1