StatusReport Method

Microsoft Outlook Visual Basic

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 (VBA) example uses the StatusReport method to report the status of the currently open task.

Sub SendStatusReport()
	Dim myOlApp As New Outlook.Application
	Dim myTask As Outlook.TaskItem
	Dim myinspector As Outlook.Inspector
	Dim myReport As Object
	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
		Else
			MsgBox "No task item is currently open."
		End If
	Else
		MsgBox "No inspector is currently open."
	End If
End Sub
		

If you use Microsoft Visual Basic Scripting Edition (VBScript) in a Microsoft Outlook form, you do not create the Application object. This example shows how to perform the same task using VBScript.

Sub CommandButton1_Click()
   If TypeName(Item) = "TaskItem" Then
     Set myReport = Item.StatusReport
     myReport.Send
   Else
     MsgBox "The current item is not a task item."
 End If
End Sub