Inspector.Close method (Outlook)
Closes the Inspector and optionally saves changes to the displayed Outlook item.
Syntax
expression.Close (SaveMode)
expression A variable that represents an Inspector object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
SaveMode | Required | OlInspectorClose | The close behavior. If the item displayed within the inspector has not been changed, this argument has no effect. |
Remarks
Note
Do not use this method from within the Inspector.Activate event (Outlook) event handler.
Example
This Visual Basic for Applications (VBA) example saves and closes the item displayed in the active inspector without prompting the user. To run this example, you need to have an item displayed in an inspector window.
Sub CloseItem()
Dim myinspector As Outlook.Inspector
Dim myItem As Outlook.MailItem
Set myinspector = Application.ActiveInspector
Set myItem = myinspector.CurrentItem
myItem.Close olSave
End Sub
See also
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.
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin