Share via


Application Object

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.

Application
Aa156199.space(en-us,office.10).gifAa156199.parchild(en-us,office.10).gif

Represents the Microsoft FrontPage application. The Application object includes properties and methods that return top-level objects. For example, the ActiveDocument property returns a document object that references the FrontPage Page object model that is compatible with Microsoft Internet Explorer 4.0 and later.

Using the Application Object

Use the Application property to return the Application object. You can use the Application property from any of the objects in FrontPage. The following example checks the current user’s logon and sets appropriate security settings from the active WebEx object. It assumes a procedure named CheckUserName already exists.

  Private Sub GetLogonName()
    Dim myWeb As WebEx
    Dim currLogonName As String
    Dim userSecurityLevel As Integer

    Set myWeb = ActiveWeb
    CurrentLogonName = myWeb.Application.UserName

    If CurrentLogonName = “Guest” then
        userSecurityLevel = 10
    Else
        Call CheckUserName(currLogonName)
    End If
End Sub

Many of the properties and methods that return the most common user-interface objects, such as the ActiveDocument property, can be used without the Application object qualifier. For example, instead of writing Application.ActiveDocument.Title, you can write ActiveDocument.Title. Properties and methods that can be used without the Application object qualifier are considered "global." To view global properties and methods in the Object Browser, click <globals> at the top of the list in the Classes box of the Object Browser.

Remarks

To use Automation to control FrontPage from another application, use the CreateObject or GetObject function to return a FrontPage Application object. The following Microsoft Word Visual Basic for Applications example starts FrontPage, opens an existing web, and closes the web.

  Private Sub StartFrontPage()
    Dim myNewFP As Variant

    Set myNewFP = CreateObject("FrontPage.Application")
    myNewFP.Webs.Open ("C:\MyWebs\Adventure Works")
    myNewFP.Webs.Close "(C:\MyWebs\Adventure Works")
    Set myNewFP = Nothing
End Sub