Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Application 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.
Used without an object qualifier, this property returns an Application 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