CurrentItem Property

Microsoft Outlook Visual Basic

Show All

CurrentItem Property

       

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

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

expression.CurrentItem

expression    Required. An expression that returns an Inspector object.

Example

This Visual Basic for Applications example uses the CurrentItem property to obtain the current item that the user is viewing. If there is no currently open item, an error will be returned.

Set myOlApp = CreateObject("Outlook.Application")
On Error Resume Next
Set myItem = myOlApp.ActiveInspector.CurrentItem