
To insert text in a Word editor as the body of the mail item, the function uses the Document object and Range object in the Word object model.

It then calls the Display method to open the mail item in an inspector. The function sets the Subject property to assign the title "Testing.". This Visual Basic for Applications (VBA) example shows a function InsertBodyTextInWordEditor that creates a mail item, assigns it a title and adds text for the body. If an Inspector object already exists for the item, the GetInspector property will return that Inspector object instead of creating a new one. This property is useful for returning an Inspector object in which to display the item, as opposed to using the Application.ActiveInspector method and setting the Inspector.CurrentItem property.

SyntaxĮxpression A variable that represents a MailItem object.

Returns an Inspector object that represents an inspector initialized to contain the specified item.
