StatusReport Method

Microsoft Outlook Visual Basic

StatusReport Method

       

Sends a status report to all CC recipients (recipients returned by the StatusUpdateRecipients property) with the current status for the task. Returns an Object representing the status report.

expression.StatusReport

expression     Required. An expression that returns a TaskItem object.

Example

This Visual Basic for Applications example uses the StatusReport method to report the status of the currently open task.

Set myOlApp = CreateObject("Outlook.Application")
Set myinspector = myOlApp.ActiveInspector
If Not TypeName(myinspector) = "Nothing" Then
  If TypeName(myinspector.CurrentItem) = "TaskItem" Then
    Set myTask = myinspector.CurrentItem
    Set myReport = myTask.StatusReport
    myReport.Send
  End If
MsgBox "There is no task item currently open"
End If
MsgBox "There is no Inspector currently open"

If you use VBScript, you do not create the Application object. This example shows how to perform the same task using VBScript.

Set myinspector = Application.ActiveInspector
If Not TypeName(myinspector) = "Nothing" Then
  If TypeName(myinspector.CurrentItem) = "TaskItem" Then
    Set myTask = myinspector.CurrentItem
    Set myReport = myTask.StatusReport
    myReport.Send
  End If
MsgBox "There is no task item currently open"
End If
MsgBox "There is no Inspector currently open"