GetInspector Property Example

This Visual Basic for Applications example uses the GetInspector property to return a new, inactive inspector for myItem, and then displays it.

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myInspector = myItem.GetInspector
myInspector.Display

If you use VBScript, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript.

Set myItem = Application.CreateItem(0)
Set myInspector = myItem.GetInspector
myInspector.Display