Поделиться через


Working with Microsoft FrontPage Objects

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.

Microsoft FrontPage is new to the Office suite of applications and is available in Microsoft Office 2000 Premium. FrontPage is a powerful and popular application used to create, deploy, and manage Web sites. You can also use FrontPage to create individual Web pages or modify existing Web pages.

FrontPage 2000 now supports the Visual Basic Editor and VBA. In addition, to enable you to work with the various parts of a FrontPage-based web or a Web page, FrontPage now exposes a complete object model that you can use either from within a FrontPage VBA project or from another application through Automation. The new VBA language elements replace the FrontPage 98 language elements. To ensure backward compatibility, the FrontPage 98 language elements are included as hidden elements in the FrontPage 2000 object model, but these language elements are not recommended for use in FrontPage 2000.

****Note   ****You can view the FrontPage object model in the . You can also use the Object Browser and Microsoft FrontPage Visual Basic Reference Help to learn more about individual objects, properties, methods, and events. For more information about using VBA to work with an Office application's object model, see Chapter 4, "Understanding Office Objects and Object Models."

Although all Office applications support VBA, it is used a bit differently in FrontPage and Outlook than it is in the other Office applications. FrontPage and Outlook support a single VBA project that is associated with a running instance of the application. The other Office applications let you associate a VBA project with each Office document. For example, you can have several workbooks open in Excel at one time, and each workbook can have its own VBA project that contains modules, class modules, and UserForms. In FrontPage, you can have several webs or Web pages open at one time, but there is only one VBA project. The FrontPage VBA project is stored in a file named Microsoft FrontPage.fpm in the following locations:

  • ****Microsoft Windows.   ****If user profiles have been set up for multiple users, Microsoft FrontPage.fpm is stored in the C:\Windows\Profiles\UserName\Application Data\Microsoft\FrontPage\Macros subfolder. If user profiles have not been set up, Microsoft FrontPage.fpm is stored in the C:\Windows\Application Data\Microsoft\FrontPage\Macros subfolder.

  • ****Microsoft Windows NT Workstation and Microsoft Windows NT Server.   ****The Microsoft FrontPage.fpm file is stored in the C:\Winnt\Profiles\UserName\Application Data\Microsoft\FrontPage\Macros subfolder.

This section discusses how to work with commonly used FrontPage objects and their related methods and properties, but it does not provide a complete discussion of the FrontPage object model. You can get more information about the objects, methods, and properties in the FrontPage object model by using Microsoft FrontPage Visual Basic Reference Help in the C:\Program Files\Microsoft Office\Office\1033\Vbafp4.chm file.

Note   The path to the Vbafp4.chm Help file reflects the language ID folder (1033) for U.S. English language support in Office. The language ID folder below C:\Program Files\Microsoft Office\Office differs for each language.