共用方式為


Inspector.CurrentItem Property (Outlook)

Returns an Object representing the current item being displayed in the inspector. Read-only.

Syntax

expression .CurrentItem

expression A variable that represents an Inspector object.

Remarks

If no item is currently open, an error message will be returned.

Example

This Visual Basic for Applications (VBA) example uses the CurrentItem property to obtain the current item that the user is viewing and closes it. If no item is currently open, an error message will be returned.

Sub CloseItem() 
 
 Dim myItem As Object 
 
 
 
 Set myItem = Application.ActiveInspector.CurrentItem 
 
 myItem.Close olSave 
 
End Sub

See Also

Concepts

Inspector Object

Inspector Object Members