This documentation is archived and is not being maintained.

Application Property

Office 2003

Returns an Application object that represents the parent application (Microsoft Outlook) for an object. Read-only.

expression.Application

expression    Required. An expression that returns an Outlook object.

Example

This Visual Basic for Applications (VBA) example uses the Application property to access Outlook and then creates a new MailItem and displays the version of Outlook used to create the item.

Sub CreateMailItem()
    Dim myolApp As Outlook.Application
    Dim myItem As Outlook.MailItem
    Set myolApp = CreateObject("Outlook.Application")
    Set myItem = myolApp.CreateItem(olMailItem)
    MsgBox myItem.Application.Version
End Sub
		

If you use Microsoft Visual Basic Scripting Edition (VBScript) in a Microsoft Outlook form, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript code.

Sub CreateMailItem()
    Set myItem = Application.CreateItem(olMailItem)
    MsgBox myItem.Application.Version
End Sub
		




Show: