Access 2003 enables you to import, export, and link to HTML documents. Although working with HTML documents is similar to working with other files types, HTML documents deserve special mention. To import an HTML document, follow these steps:
Right-click anywhere within the Database window and choose Import.
From the Files of Type drop-down list, select HTML Documents.
Select the document you want to import and click Import. The Import HTML Wizard appears, as shown in Figure 19.22.
Figure 19.22. The first step of the Import HTML Wizard.
The first step of the wizard attempts to parse the HTML document into fields. You can accept what the wizard has done or click Advanced. The Import Specification dialog box that appears enables you to designate field names, data types, and indexes for each field; and to select any fields you want to eliminate from the imported file (see Figure 19.23). This dialog box also enables you to modify the date order, date delimiter, and more.
Figure 19.23. The Import Specification dialog box enables you to designate the specifics of the import.
After you make any required changes to the import specifications, click OK to return to the Import HTML Wizard. Click Next to advance to the next step of the wizard, which enables you to select whether the imported data is stored in a new table or in an existing table. Make your selection and then click Next.
Designate a field name, data type, and index for each field, as shown in Figure 19.24. Make any desired changes here and click Next.
Figure 19.24. Customizing the properties of each imported field.
The fourth step of the wizard enables you to indicate that you want Access to add a primary key to the table, that you want to select your own primary key, or that you don't want the imported table to have a primary key. Make your selection and click Next.
The final step of the wizard enables you to assign a name to the table. You even can have the wizard analyze the table after importing it. Click Finish after you make your selection.
Not only can you import an HTML document, but you can also link to one. To link to an HTML document, follow these steps:
Right-click anywhere within the Database window and choose Link Tables.
From the Files of Type drop-down list, select HTML Documents.
Select the table you want to link to and click Link. The Link HTML Wizard appears.
Click the Advanced button to modify any link specifications and return to the first step of the wizard. Click Next to move to the second step of the wizard.
Specify information about each field you are linking to. Make any required changes and click Next.
Supply a name for the linked table and click Finish.
Although an imported HTML document acts like any other Access table, you can't modify the data in a linked HTML document from within Access. You can use the linked document to create queries, reports, and forms.