Application Property

Microsoft Word Visual Basic

object that represents the Microsoft Word application. Used with an object qualifier, this property returns an Application object that represents the creator of the specified object. When used with an OLE Automation object, it returns the object's application.

expression.Application

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

Remarks

Visual Basic's CreateObject and GetObject functions give you access to an OLE Automation object from a Visual Basic for Applications project.

Example

This example displays scroll bars, screen tips, and the status bar for Microsoft Word.

With Application
    .DisplayScrollBars = True
    .DisplayScreenTips = True
    .DisplayStatusBar = True
End With
		

This example displays the Microsoft Excel startup path if Excel is running.

If Tasks.Exists(Name:="Microsoft Excel") = True Then
    Set myobject = GetObject("", "Excel.Application")
    MsgBox myobject.Application.StartupPath
    Set myobject = Nothing
End If