Chapter 15

Automating Pages with Bots


CONTENTS

Sometimes, you need to work with content other than HTML format. For example, you might want to use a text editor to edit text or ASCII files that are located in your web. You might want to touch up a graphic. You might want to convert a word processing document, spreadsheet, or presentation into Web pages. You can open many types of documents in FrontPage. You can also configure FrontPage to open other types of editors when you click the file you want to edit. This chapter shows you how.

Integrating with Office 97

At the time of this writing, Office 97 was still in the beta testing phase. From the preview information that is currently available, it looks as though you have one killer combination when you use FrontPage 97 with Office 97. Office 97 also gives you the ability to create Web pages without learning HTML. You can create hyperlinks from one type of Office document to another. When you import Office 97 documents into FrontPage 97, you can view hyperlinks to all Office 97 documents in the FrontPage Explorer. This allows you to collaborate the content of your Web site and place all your Web content at your fingertips. Click and you're there.

A portion of Office 97's Internet capabilities lies in its ActiveWeb features. You are able to author and view documents in their native formats. When you use Microsoft Outlook, an integral part of Office 97, you enter a URL or UNL address in your document and it automatically creates a link to a file or site.

You can convert your Office documents into HTML format at the click of a button. However, you don't have to convert to HTML-you can use files in native Office 97 formats as well. This allows you to analyze and edit the data as you usually do. Using Web Find Fast, a Web administrator can create a full context index and an organized catalog of documents on the site. For corporate intranet users, this is a boon to site development.

Microsoft Office 97 uses ActiveX technology to work seamlessly with common Web browsers. ActiveX technology is built into Internet Explorer 3.0 and employed in other browsers through plug-ins. You can share Office documents through FTP services. For those who do not use Microsoft Office, you can distribute the appropriate viewers that allow the user to view and print Office 97 documents.

Here are some additional highlights:

With all of this going on in Office 97, one wonders how FrontPage fits in to the picture. You can use FrontPage to manage all this data and organize your Web site. From the FrontPage Explorer, you can view all Office 97 content in your Web. When you want to edit a file, you simply open the file from the FrontPage Explorer, and there it is-right at your fingertips.

For those developers who don't use Office 97, FrontPage still offers many ways to use content that was developed in other applications. You can import any type of file into your web and use helper applications to view them. In addition, several word processing file formats have been added to FrontPage 97 and can automatically be converted into HTML format. This chapter tells you how to work with them.

Working with HTML Files

You've already learned how to create your own pages and how to use the Import Web Wizard to import existing Web sites into your FrontPage webs. Sometimes, however, you'll want to work with files from locations other than your current web. The following tasks show you how.

Opening HTML Files

You can open existing HTML documents from your local or network hard drive or from the World Wide Web. You use the FrontPage Editor in both cases. Once you open the file, you can save it to your current web or another directory on your local or network hard drive.

To open an HTML file in the FrontPage Editor, do the following:

  1. In the FrontPage Editor, select File | Open (Ctrl+O), or use the Open button on the Standard toolbar. The Open dialog box appears. Click the Other Location tab, shown in Figure 15.1.
    Figure 15.1 : Use the Other Location tab in the Open File dialog box to open files on your local or network hard drive.

  2. Click the Browse button. The Open File dialog box, shown in Figure 15.2, appears.
    Figure 15.2 : From this Open File dialog box, select the file you want to open.

  3. From the "Files of type" drop-down menu, choose one of the following file formats:
    HTML Files (*.htm, *.html)
    Preprocessed HTML (*.htx, *.asp)

NOTE
The .htx file extension is used with preprocessed HTML files used with the Database Connector Wizard. The .asp file extension is compatible with Active Server pages. (Internet Information Server is required to run Active Server pages.)

  1. Select the file, and click Open. FrontPage opens the file in a new window.

Inserting HTML Files

You can insert an HTML file into another Web page in the FrontPage Editor. The file is inserted at the current insertion point.

  1. In the FrontPage Editor, select Insert | File. The Select a File dialog box, shown in Figure 15.3, appears.
    Figure 15.3 : Use the Select a File dialog box to insert an HTML document into another Web page.

  2. From the "Files of type" drop-down menu, choose one of the following file formats:
    HTML Files (*.htm, *.html)
    Preprocessed HTML (*.htx, *.asp)
  3. Locate the file you want to insert. Select the file, and click Open. FrontPage inserts the file at the current insertion point.

Opening HTML Pages from the World Wide Web

You also can open a Web page from the World Wide Web. In this case, you use the File | Open command and select the From Location button in the Open Location tab.

  1. Establish a connection to the Internet.
  2. In the FrontPage Editor, select File | Open (Ctrl+O), or use the Open button on the Standard toolbar. The Open File dialog box appears.
  3. Select the Other Location tab, and choose the From Location radio button.
  4. Enter the URL of the page to which you want to navigate, and click OK. You navigate to the page, and it opens in the FrontPage Editor.

Working with Non-HTML Content

Think of all the different types of documents you work with on a daily basis. You have word processing documents, spreadsheets, image editing programs, sound editing software, presentation software, and so on. You get the picture. Often, you find yourself minimizing your current program to access the Start menu to start another editor when your files need revision.

In FrontPage, you don't even have to leave. You can configure other editors to use with any type of content you have in your Web site. All you have to do from the FrontPage Explorer is click a text file, and a text editor opens. Click a graphic, and your graphics program opens. If a MIDI file needs tweaking, click the file and your MIDI software opens. Even click a word processing file or spreadsheet, and your editor opens with the document ready and waiting. How do you get this capability? You tell FrontPage which editors you want to use.

Associating File Types with Editors

To associate a file type with another editor, use the Tools | Options command in the FrontPage Explorer. After an editor is configured, you can open any file with the extension that you configured. The associated editor is invoked automatically.

To configure an editor and file type, perform the following steps:

  1. In the FrontPage Explorer, select Tools | Options. The Options dialog box appears. Click the Configure Editors tab, shown in Figure 15.4.
    Figure 15.4 : The Configure Editors tab in the Options dialog box enables you to associate an editor with a file extension.

  2. Click the Add button. The Add Editor Association dialog box appears (see Figure 15.5).
    Figure 15.5 : You associate an editor with a file extension in the Add Editor Association dialog box.

  3. In the File Type field, specify a file extension for the file type. You do not need to enter a period before the extension. To indicate files that have no extensions, use a period by itself.

NOTE
FrontPage enables you to configure only one editor per extension. If you try to add an editor association for a file extension that is already configured, you get an error message.

  1. In the Editor Name field, enter the name of the editor.
  2. In the Command field, enter the full path to the executable file for the editor, or use the Browse button to locate the executable file from a drive and directory on your hard drive. After you locate the file, click Open to return to the Add Editor Association dialog box.
  3. Click OK. The new editor appears in the Configure Editors list.

After an editor is configured, you can open it from the FrontPage Explorer. In the FrontPage Explorer's Link view or Summary view, just double-click the file that you want to edit. Its associated editor opens.

NOTE
When you open a file with another editor, FrontPage places a copy of it in the \Microsoft FrontPage\temp directory. After you save the file in your editor, it appears in the FrontPage Explorer's Import List in the Import File to Web dialog box. FrontPage should then import the updated file to your web automatically.

Changing Editor Associations

If you want to use another editor to edit a specific type of file, it is simple to edit the association:

  1. In the FrontPage Explorer, select Tools | Options. The Options dialog box appears. Choose the Configure Editors tab.
  2. Highlight the editor configuration that you want to change.
  3. Click the Modify button. The Modify Editor Association dialog box appears. (See Figure 15.6.)
    Figure 15.6 : You change the associated editor for a file type in the Modify Editor Association dialog box.

  4. In the Editor Name field, enter the name of the new editor.
  5. In the Command field, enter the full path to the executable file for the editor, or use the Browse button to choose the executable file from a drive and directory on your hard drive. After you select your new editor, click Open to return to the Modify Editor Association dialog box.
  6. Click OK. The revised editor configuration appears in the Configure Editors list.

Removing Editor Associations

If you find that you no longer work with files of a certain type, you can remove their editor association from FrontPage:

  1. In the FrontPage Explorer, select Tools | Options. The Options dialog box appears. Select the Configure Editors tab.
  2. Select the editor configuration that you want to remove.
  3. Click the Remove button. To confirm the removal, click OK. To undo the removal, click Cancel.

NOTE
You cannot remove the default editor and file type associations supplied with FrontPage.

Importing Non-HTML Content into Your Web

Now that you know you can work with all these different types of content, you need to know how to get it into your Web site. Keep in mind your audience might not be able to view every type of document that you can. If the file types you include on your web are not commonly supported by browsers, you need to recommend a helper application or provide links so the user can download an appropriate viewer.

To import non-HTML content into your web, follow these steps:

  1. From the FrontPage Explorer, choose View | Folder View, or click the Folder View button on the toolbar.
  2. From All Folders view, highlight the folder into which you want to import the files.
  3. Choose File | Import. The Import File to FrontPage Web dialog box, shown in Figure 15.7, appears.
    Figure 15.7 : Use the Import File to FrontPage Web and Add File to Import List dialog boxes to import any type of content into your web.

  4. To import one or more files from your local or network hard drive, click the Add File button. The Add File to Import List dialog box appears. In the "Files of type" field, select All Files (*.*) from the drop-down menu. Locate the drive and directory in which your files reside. Highlight the file or files, and click Open. You return to the Import File to FrontPage Web dialog box.
  5. To import an entire folder of files, click the Add Folder button. The Browse for Folder dialog box appears. Highlight the folder that contains the content you want to import, and click OK. The contents of the folder appears in the Import File to FrontPage Web dialog box.
  6. By default, the files you select for import are placed in the home folder in the web or the folder you selected to import the files into. You can use the Edit URL button to save the files in your import list to another existing folder in your web. After you edit the URL, choose OK to return to the Import File to FrontPage Web dialog box.
  7. To remove files from the import list, highlight the file you want to remove and click the Remove button. The file is removed from the import list.
  8. To import the file or files to your web, click OK. The files appear in the directory you selected.

Converting Non-HTML Documents

Although it's nice to be able to include many types of documents on your Web site, you have the worry of keeping track of helper applications. FrontPage automatically converts the file types shown in Table 15.1 into HTML format when you open them.

Table 15.1. File formats supported in the FrontPage Editor.

File TypeExtensions
Rich text format*.rtf
Text files*.txt
Hypertext templates*.htt
Word 6.0/95 for Windows and Macintosh*.doc
Microsoft Excel Worksheet*.xls, *.xlw
WordPerfect 6.x*.wpd, *.doc
Works 3.0 for Windows*.wps
Works 4.0 for Windows*.wps
Word Asian versions 6.0/95*.doc
Word 4.0-5.1 for Macintosh*.mcw
Word 2.x for Windows*.doc
Word 97*.doc

Working with Text Files

When you open a text file in the FrontPage Editor, it is converted to a new HTML document that can be added to the current web.

To open a text file from the FrontPage Editor, follow these steps:

  1. In the FrontPage Editor, choose File | Open (Ctrl+O), or use the Open button on the Standard toolbar. The Open File dialog box appears.
  2. Select the Other Location tab.
  3. To open a text file from your local or network hard drive, click the From File radio button. Choose the Browse button to locate the file on your hard drive.
  4. From the "Files of type" drop-down menu, choose Text Files (*.txt).
  5. Select the text file and click Open. The Convert Text dialog box, shown in Figure 15.8, appears.
    Figure 15.8 : Use the Convert Text dialog box to choose how you want to convert a text file.

  6. Choose one of the following conversion options and click OK. As shown in Figures 15.9 through 15.12, import the fpreadme.txt file, located in the Microsoft FrontPage directory.
    Figure 15.9 : When you choose one formatted paragraph, each line ends with a line break. The entire page is one continuous formatted paragraph.


    Figure 15.10 : When you choose formatted paragraphs, each paragraph begins as a new formatted paragraph. The lines within each paragraph use line breaks.


    Figure 15.11 : When you choose normal paragraphs, each paragraph is formatted as a normal paragraph. No line breaks are included.


    Figure 15.12 : When you choose normal paragraphs with line breaks, each paragraph is formatted as a normal paragraph. Line breaks retain the original formatting of the text document.

  7. Use the File | Save (Ctrl+S) command to save the page to the current web.

When you insert a text file, FrontPage converts the file and inserts it at the insertion point in the current page:

  1. From the FrontPage Editor, open or create a page in which to insert the text file.
  2. Position the insertion point where you want the text file to appear.
  3. Choose Insert | File. The Select a File dialog box appears.
  4. Use the Look In field to locate the drive and directory where the text file appears.
  5. From the "Files of type" drop-down menu, choose Text Files (*.txt).
  6. Select the file, and click Open. The Convert Text dialog box appears.
  7. Choose a conversion option and click OK. The text file is inserted at the insertion point.

Working with RTF Files

You can save any word processing document as an RTF file and open or insert its content into a page that can be saved in your current web. The one drawback to rich text format files, however, is that they usually don't retain the nice layout that you spent so much time with in your word processor. For example, if your original document uses multiple columns, you lose them when converting to rich text format. You can add tables to the Web page version of your document to add columns back.

Figure 15.13 shows a Word document that was saved in rich text format. Compare this to Figure 15.14, which is a screen shot of the same area of the page after it is opened in the FrontPage Editor and converted to HTML. As you can see, the text in the page retains the formatting of the original document, using heading styles and font formatting that is fairly consistent with the original document.

Figure 15.13 : The rich text format document as it appears in a word processor.

Figure 15.14 : After converting to HTML format in the FrontPage Editor, the text retains the original formatting.

To open a rich text format document, follow these steps:

  1. In the FrontPage Editor, choose File | Open (Ctrl+O), or use the Open button on the Standard toolbar. The Open File dialog box appears.
  2. Select the Other Location tab.
  3. To open a rich text format file from your local or network hard drive, click the From File radio button. Choose the Browse button to locate the file on your hard drive.
  4. From the "Files of type" drop-down menu, choose Rich Text Format (*.rtf).
  5. Highlight the page that you want to open and click Open. FrontPage converts the RTF document to HTML format and creates a new page for you. Any graphics that are contained in the RTF document are converted to GIF or JPEG format, as appropriate.
  6. Save the page to your current web with the File | Save command. Assign it a title and a URL.

TIP
A graphic might appear larger or smaller in a FrontPage Web page than it does in the original RTF file. If this is the case, open it in a graphics editor and check the dots per inch setting at which the graphic was saved. Graphics convert best if their dpi setting is 72.

You also can insert an RTF document into any Web page:

  1. From the FrontPage Editor, open or create a page in which to insert the text file.
  2. Position the insertion point where you want the text file to appear.
  3. Choose Insert | File. The Select a File dialog box appears.
  4. From the "Files of type" drop-down menu, choose Rich Text Format (*.rtf).
  5. Locate the drive and directory where the RTF file is located.
  6. Highlight the page that you want to open and click Open. FrontPage converts the RTF document to HTML format and inserts it at your insertion point. Any graphics that are contained in the RTF document are converted to GIF or JPEG format, as appropriate.
  7. Save the page to your current web with the File | Save command. Assign it a title and a URL.

Working with Word Processor Files

Table 15.1, shown earlier in this chapter, lists several word processing formats that you can open in FrontPage. When you open any of these file types in the FrontPage Editor, the file is first converted to rich text format and then into HTML format before it opens in the FrontPage Editor. As with the previous example, documents that contain multiple columns need to be touched up.

The steps to open and insert word processing files are the same as those outlined for rich text format files; the exception is that you select the file format for the word processor you use. Figure 15.15 shows a document as it appears in Microsoft Word 95. Compare this to the HTML version, shown in Figure 15.16. There are some minor differences in formatting (bold text in the original is formatted as italics in some cases), but for the most part, the text retains its original formatting.

Figure 15.15 : The original document as it appears in Microsoft Word 95.

Figure 15.16 : After converting to HTML format in the FrontPage Editor, the text formatting is fairly consistent with the original document.

Things are a little bit different in the HTML world, as you can see. HTML pages are meant to be viewed in multiple platforms, and for that reason, the formatting is basic. (It's getting there, though!) If you design a word processing document that you feel is destined for the Web, you can lay out your content in tables, rather than use the word processor to format the column layout. Figure 15.17 shows a simple table that was imported from a Word 95 document into FrontPage. The table retained the layout from the original file.

Figure 15.17 : You can use tables in your original word processing document to control layout and then convert into HTML format.

You have another way around these differences. Most word processors have viewers that the user can download. They allow the user to view and print the word processing document in its native format. Provide a link to download the appropriate viewer in your site.

If you use Microsoft Office or Microsoft Word 95, you can find the current version of the viewer at the following URL:


http://www.microsoft.com/msword/internet/viewer/

Working with Spreadsheet and Database Software

FrontPage also opens Excel spreadsheet files and converts the data in the cells into tables. You open or insert an Excel spreadsheet using the same procedures outlined in the previous tasks. Choose Microsoft Excel Worksheet (*.XLS, *.XLW) from the Files of Type drop-down menu. Figure 15.18 shows an example of a simple table that was created by opening an Excel worksheet in FrontPage.

Figure 15.18 : Excel worksheet cell data is converted into tables. To import charts, copy the chart from Excel into your clipboard and paste it into your Web page.

If your Excel spreadsheets contain charts, they are not imported into FrontPage with the spreadsheet. To place the chart in the Web page, as shown in Figure 15.18, open your spreadsheet in Excel. Select the chart and copy it into the clipboard using Edit | Copy or Ctrl+C. Then, return to the FrontPage Editor and paste the chart into the page using Edit | Paste or Ctrl+V. The chart image is formatted into JPEG format by default.

You also can import an Excel spreadsheet into your web and provide a link to it on another page. Likewise, provide a link to the following URL so that users can download the Excel Viewer:


http://www.microsoft.com/msexcel/internet/viewer/

Working with Presentation Software

As with other file formats, you can check to see if your presentation software has an available viewer so that visitors can view your presentations in their native format. You can also check to see if your software provides a utility that converts your presentations into Web pages.

Internet Assistant for PowerPoint 95 can enhance the use of PowerPoint presentations in your web. It converts PowerPoint presentations into a series of consecutively numbered HTML files and provides navigation between them. The presentation screens are converted to graphics that are placed on each page. You can download this utility from


http://www.microsoft.com/mspowerpoint/internet/ia/

You also can import a PowerPoint presentation into your web and provide a link to it on another Web page. Likewise, provide a link to the following URL so that users can download the PowerPoint Viewer:


http://www.microsoft.com/msoffice/mspowerpoint/internet/viewer/

If your PowerPoint presentation includes animated effects, check out what is available in the PowerPoint Animation Player for ActiveX. Internet Explorer 3.0 provides built-in ActiveX support. You can download the PowerPoint Animation Player for ActiveX from


http://www.microsoft.com/powerpoint/internet/player/default.htm

Workshop Wrap-Up

FrontPage works with a wide variety of file formats. You can import just about any type of file into your web, as well as recommend helper applications or viewers to visitors to your site. You can open these files by configuring editors in the FrontPage Explorer. You can open and insert text or rich text format and other word processing documents in your Web documents directly, and you can save them in standard HTML format to your web. FrontPage also converts Excel spreadsheet data into tables.

In this chapter, you learned how to work with types of files other than HTML. You learned how to configure FrontPage to open an editor associated with a specific file type by clicking the file that you want to edit. You also learned about using other Microsoft Office documents in your web.

Next Steps

In the next chapter, you learn how to work with database information in your webs. By using the Database Connector Wizard, you can work with data from any ODBC-compliant database. For more information that relates to topics discussed in this chapter, consult these chapters:

Q&A

Q:What should I do if my word processor doesn't export to rich text format, and I don't have a viewer available to view files in their native format?
A:Most Windows word processors have this option. If yours does not, it might be necessary for you to convert your word processing document into text format instead. When you save your document, select Text format (sometimes called ASCII text). If your word processor has an option to save as Text with Layout, line breaks are inserted to format the document properly.
Q:Is there any way that I can import spreadsheet data from another spreadsheet program if I don't have Excel?
A:One thing to check-your spreadsheet software might allow you to export your spreadsheet into Excel format. Try this first. If that is not an option, open your spreadsheet software and select the cells you want to place into a Web page. Copy them into your clipboard using Ctrl+C. Then, position the insertion point on the page you have open in the FrontPage Editor. Use Ctrl+V to paste the cells onto your page.