SharedWorkspaceTasks.Add Method
Adds a task to the list of tasks in a shared workspace and returns a SharedWorkspaceTask object.
Namespace: Microsoft.Office.Core
Assembly: office (in office.dll)
Syntax
'Declaration
Function Add ( _
Title As String, _
Status As Object, _
Priority As Object, _
Assignee As Object, _
Description As Object, _
DueDate As Object _
) As SharedWorkspaceTask
'Usage
Dim instance As SharedWorkspaceTasks
Dim Title As String
Dim Status As Object
Dim Priority As Object
Dim Assignee As Object
Dim Description As Object
Dim DueDate As Object
Dim returnValue As SharedWorkspaceTask
returnValue = instance.Add(Title, Status, _
Priority, Assignee, Description, _
DueDate)
SharedWorkspaceTask Add(
string Title,
Object Status,
Object Priority,
Object Assignee,
Object Description,
Object DueDate
)
Parameters
Title
Type: System.StringRequired String. The title of the new task.
Status
Type: System.ObjectOptional MsoSharedWorkspaceTaskStatus. The status of the new task. Default is msoSharedWorkspaceTaskStatusNotStarted.
Priority
Type: System.ObjectOptional MsoSharedWorkspaceTaskPriority. The priority of the new task. Default is msoSharedWorkspaceTaskPriorityNormal.
Assignee
Type: System.ObjectOptional SharedWorkspaceMember. The member to whom the new task is assigned.
Description
Type: System.ObjectOptional String. The description of the new task.
DueDate
Type: System.ObjectOptional Date. The due date of the new task.
Return Value
Type: Microsoft.Office.Core.SharedWorkspaceTask
Remarks
The schema that defines shared workspace tasks and their properties for a SharePoint Products and Technologies site can be modified on the server in such a way that the Add method of the SharedWorkspaceTasks collection may raise an error, or may disregard the values of certain arguments. In particular, the task status and priority enumerations can be customized. Some examples of the problems that can result are mentioned below:
If a Status argument is supplied, and the status field has been removed from the customized tasks schema, the argument will be ignored and no error will be raised.
If a Status value is supplied that lies outside the status values recognized by the customized tasks schema, the argument will be ignored, the default value will be used, and no error will be raised.
If a new required field has been added to the customized tasks schema, then the Add method will fail with an error, and it will no longer be possible to use the Add method to add new tasks.