Muokkaa

Jaa


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

Inspector Object

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.