Getting Started Extending FrontPage 2003
Microsoft Office FrontPage 2003
Summary: Learn how you can extend Microsoft Office FrontPage 2003 to extend features and provide functionality that are not built into the application. This article explains the various ways in which you can extend FrontPage and provides pointers to detailed articles that walk you through each technique. (3 printed pages)
There are a variety of reasons why you might want to extend Microsoft Office FrontPage 2003. You may want to add functionality that FrontPage doesn't have built in, you may want to extend the built-in functionality, or you may want to design built-in functionality differently. You can extend the FrontPage application using several techniques. This article describes those techniques and helps you decide which ones are best for your projects.
FrontPage 2003 provides several ways that you can extend FrontPage using XML. Find and Replace, Accessibility, and Interactive Buttons all use XML files to provide functionality in FrontPage 2003. By modifying the existing XML files or creating additional XML files that adhere to the appropriate schemas, you can extend the functionality of these features.
Note XML stands for Extensible Markup Language. XML is a markup language designed to describe data. You can use XML to develop custom schemas to describe custom data sets. For more information on XML and the XML specification, see Extensible Markup Language on the World Wide Web Consortium Web site.
Find and Replace
Microsoft built the Find and Replace feature in FrontPage 2003 on an XML framework. This framework allows you to create custom find and replace functionality that you can share with customers, clients, and co-workers. The schema is relatively simple, and you can use regular expressions to find and replace patterns of text and code. For more information about customizing Find and Replace, see Extending Find and Replace for Microsoft Office FrontPage 2003.
Code snippets are a great way to reuse code and a time saver that eliminates retyping the same code repeatedly across several pages. For example, you can use code snippets to store DOCTYPE declarations and links to external cascading style sheets and scripting files. You can customize code snippets by creating Code Snippet schema files, and you can easily share your code snippets by sending the code snippet XML files to others. For more information about the Code Snippet schema, see Customizing Code Snippets in FrontPage 2003.
Designing accessible Web sites can allow your Web sites to be viewable and usable by people with disabilities. The Accessibility feature in FrontPage 2003 gives you the ability to verify whether your Web sites meet published accessibility standards. However, not all accessibility guidelines are included in the built-in functionality. Therefore, FrontPage provides an XML schema that you can use to add rules that were not included by default or new rules that are added subsequent to when FrontPage 2003 shipped. For more information, see Adding Rules to the Accessibility Checker.
Interactive Buttons are a new feature in FrontPage 2003 that allows users to create button mouse-over effects. Interactive Buttons was built on an XML framework, which allows you to create custom Interactive Buttons and provide that custom functionality to others. The best aspect of this feature is that you don't have to write any script code in order to create custom Interactive Buttons. For more information, see the Knowledge Base article Create and Modify Custom Interactive Buttons in FrontPage 2003.
Working with XML is a great and simple way to extend FrontPage using text in XML files. However, FrontPage also provides some very simple code solutions that you can use to extend the FrontPage application.
The Behaviors feature in FrontPage 2003 allows users to quickly and easily insert scripts into their Web pages without writing a bit of code. Extending Behaviors is almost as easy. If you know Microsoft JScript, the Microsoft implementation of the ECMAScript scripting language specification, you can use the Behaviors API to create powerful custom behaviors that you can easily distribute to others. If you are interested in extending FrontPage by creating custom behaviors, see Creating Custom Behaviors in FrontPage 2003.
One of the fastest ways to extend FrontPage is to create macros in the Microsoft Visual Basic Editor (VBE) that allow you to extend functionality and automate repetitive tasks. Macros use the FrontPage Visual Basic for Applications (VBA) object models to access the FrontPage application; with them, you can create toolbars, publish Web sites, manipulate HTML, and more. Although FrontPage does not include a macro recorder, you can learn how to create macros to automate tasks in the article Automating Repetitive Tasks in FrontPage 2003.
Add-ins are a way to create powerful solutions that extend FrontPage beyond its built-in capabilities. Although add-ins are more complicated than macros or behaviors, they are not beyond the capabilities of the average developer. You can create two basic types of add-ins. COM add-ins use a COM language, such as Microsoft Visual Basic 6.0 or Microsoft Visual C++ 6.0, and are relatively simple because FrontPage 2003 is built on a COM architecture. Managed add-ins are somewhat more complicated and not entirely trouble free, but they are a great way to create add-ins that take advantage of the incredible functionality of the Microsoft .NET Framework.
Because FrontPage is a COM application, COM add-ins are a natural way to develop functionality beyond the built-in functionality. In addition, because the VBA object models were part of FrontPage since FrontPage 2000, you can create COM add-ins that work in older versions of FrontPage or across multiple versions of FrontPage. For more information about creating COM add-ins, see About Add-ins in the FrontPage 2002 Software Development Kit.
Managed add-ins use the Microsoft .NET Framework. Therefore, you can develop managed add-ins in any of the languages that use the Microsoft .NET Framework, such as Microsoft Visual Basic .NET or Microsoft Visual C#. Managed add-ins have some limitations, and there are some known issues around creating and working with managed add-ins. Before you start writing managed add-ins for FrontPage, you should read Creating Managed FrontPage 2003 Add-ins in C#.
Extending FrontPage beyond its built-in capabilities is easy once you understand how. This article introduced you to the main ways that you can extend FrontPage. After you determine which method works for you, check out the resources cited in this article as well as additional resources on the FrontPage Developer Portal on MSDN. If you need assistance along the way, you can find experts in the FrontPage Programming newsgroup who are ready and willing to help you along the way.