Am 8 Oct 2005 05:01:30 -0700 schrieb
(E-Mail Removed):
I´m not sure what you´re asking for. You don´t have to reference each item
at once. You need a reference on each opened TaskItem and one on the
currently selected TaskItem (if any) in each opened Explorer. In that way
you´re able to track each TaskItem´s events, which an user could edit.
Please see also the VBA help. There´re samples for all mentioned events:
NewInspector, PropertyChange, SelectionChange.
For one TaskItem in an Explorer the code looks like this:
Private WithEvents m_oTask as Outlook.TaskItem
Private WithEvents m_oExplorer As Outlook.Explorer
Private Sub Application_Startup()
Set m_oExplorer = Application.ActiveExplorer
End Sub
Private Sub m_oExplorer_SelectionChange()
If m_oExplorer.CurrentFolder.DefaultItemType = olTaskItem Then
Set m_oTask = m_oExplorer.Selection(1)
End If
End Sub
Private Sub m_oTask_PropertyChange(ByVal Name As String)
If Name="Complete" Then
If m_oTask.Complete=True Then
' ...
Endif
Endif
End Sub
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
> Wooh,
>
> Sounds complicated. Is that a procedure which would take a long time
> considering I have about 800 tasks?
>
> How would the code look like?
>
> Any short sample to get me starting?
>
> Marco