Yes, I already add the Send code inside. the following is the code:
Sub Item_PropertyChange(ByVal Name)
Select Case Name
Case "Status"
if Item.Status = 2 then '2 = Completed
Set NewItem = Application.CreateItem(0)
NewItem.To = "myemailaddress@myisp.com"
NewItem.Recipients.ResolveAll
NewItem.Subject = "This is the message subject text"
NewItem.Body = "This is text that will appear in the body
of the message."
NewItem.Send
End IF
End Select
End Sub
Then I create the task, and send DueDate, ReminderTimer and the Recurring
rule. when the task is overdue,
the color of the task in tasklist is changed to red, but don't trigger the
above envent. It means that outlook dosen't
call Item_PropertyChange(ByVal Name) when task's overdue. but I want do
"Send mail automatic" when the task's overdue.
so how should i do?
"Michael Bauer [MVP - Outlook]" <mb@mvps.org>
??????:1ankaquxrw67t$.bnf8votl40lf$.dlg@40tude.net...
>
>
> The sample doesn't send but display the e-mail. If you want it to be sent
> don't call the Display but Send method.
>
> --
> Best regards
> Michael Bauer - MVP Outlook
>
> : Outlook Categories? Category Manager Is Your Tool:
> : <http://www.vboffice.net/product.html?pub=6&lang=en>
>
>
> Am Tue, 6 May 2008 10:06:49 +0800 schrieb Shen:
>
>> Dear all,
>>
>> I'm a novice about outlook programmmer. Now,there is a problem when I
>> write the code for atuomatic sending the email.
>>
>> according the article from the microsoft:
>>
http://support.microsoft.com/kb/239087/en-us/ I created the task, but
> when
>> I receive the reminder that the task is due, It can't send the mail
>> automatic, I should give the "Complete" flag to trigger the
>> Item_PropetyChange() event.But I want it complete automatic sending the
>> mail. How can I do?
>>
>> I think I should add a another event about the task overdue, but I
> don't
>> know how to do? pls help!
>>
>> Thanks!
>>
>> Sam