Inspector.CurrentItem property (Outlook)
Returns an Object representing the current item being displayed in the inspector. Read-only.
expression A variable that represents an Inspector object.
If no item is currently open, an error message will be returned.
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.