Application Object

Microsoft FrontPage Visual Basic

Application Object

Application Multiple objects

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 accesses the Application object, and then displays the Open dialog box.

    Application.FileDialog(msoFileDialogOpen).Show
  

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 (VBA) example starts FrontPage, opens an existing Web site, and closes the Web site.

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