Share via


GetInspector Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.  

Returns an Inspector object that represents an inspector initialized to contain the specified item. This property is useful for returning a new Inspector object in which to display the item, as opposed to using the ActiveInspector method and setting the CurrentItem property.

expression**.GetInspector**

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

If the user’s default e-mail editor is Microsoft Word, and if the message format of the item being edited is plain text or HTML, GetInspector produces an error and returns Nothing.

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