Partager via


TaskItem Object

TaskItem
Multiple objects

Represents a task (an assigned, delegated, or self-imposed task to be performed within a specified time frame) in a Tasks folder.

Using The TaskItem Object

Use the CreateItem method to create a TaskItem object that represents a new task.

The following Visual Basic for Applications (VBA) example returns a new task.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olTaskItem)

The following sample shows how to create a task using Microsoft Visual Basic Scripting Edition (VBScript).

Set myItem = Application.CreateItem(3)

Use Items (index), where index is the index number of a task or a value used to match the default property of a task, to return a single TaskItem object from a Tasks folder.

Remarks

If a program tries to reference any type of recipient information by using the Outlook object model, a dialog box is displayed that asks you to confirm access to this information. You can allow access to the Address Book or recipient information for up to ten minutes after you receive the dialog box. This allows features, such as mobile device synchronization, to be completed.

You receive the confirmation dialog box when a solution tries to programmatically access the following properties of the TaskItem object:

  • ContactNames
  • Delegator
  • Owner
  • StatusUpdateRecipients
  • StatusOnCompletionRecipients

Properties | Actions Property | ActualWork Property | Application Property | Attachments Property | AutoResolvedWinner Property | BillingInformation Property | Body Property | CardData Property | Categories Property | Class Property | Companies Property | Complete Property | Conflicts Property | ContactNames Property | ConversationIndex Property | ConversationTopic Property | CreationTime Property | DateCompleted Property | DelegationState Property | Delegator Property | DownloadState Property | DueDate Property | EntryID Property | FormDescription Property | GetInspector Property | Importance Property | InternetCodepage Property | IsConflict Property | IsRecurring Property | ItemProperties Property | LastModificationTime Property | Links Property | MarkForDownload Property | MessageClass Property | Mileage Property | NoAging Property | Ordinal Property | OutlookInternalVersion Property | OutlookVersion Property | Owner Property | Ownership Property | Parent Property | PercentComplete Property | Recipients Property | ReminderOverrideDefault Property | ReminderPlaySound Property | ReminderSet Property | ReminderSoundFile Property | ReminderTime Property | ResponseState Property | Role Property | Saved Property | SchedulePlusPriority Property | Sensitivity Property | Session Property | Size Property | StartDate Property | Status Property | StatusOnCompletionRecipients Property | StatusUpdateRecipients Property | Subject Property | TeamTask Property | TotalWork Property | UnRead Property | UserProperties Property

Methods | Assign Method | CancelResponseState Method | ClearRecurrencePattern Method | Close Method | Copy Method | Delete Method | Display Method | GetRecurrencePattern Method | MarkComplete Method | Move Method | PrintOut Method | Respond Method | Save Method | SaveAs Method | Send Method | ShowCategoriesDialog Method | SkipRecurrence Method | StatusReport Method

Events | AttachmentAdd Event | AttachmentRead Event | BeforeAttachmentSave Event | BeforeCheckNames Event | BeforeDelete Event | Close Event | CustomAction Event | CustomPropertyChange Event | Forward Event | Open Event | PropertyChange Event | Read Event | Reply Event | ReplyAll Event | Send Event | Write Event

Parent Objects

Child Objects | Actions Object | Attachments Object | Conflicts Object | FormDescription Object | ItemProperties Object | Links Object | Recipients Object | UserProperties Object