Microsoft KB Archive/170220
Article ID: 170220
Article Last Modified on 1/20/2007
- Microsoft Access 97 Standard Edition
This article was previously published under Q170220
Moderate: Requires basic macro, coding, and interoperability skills.
When you use the TransferText macro action to export an HTML or text file using a specification table, you may receive the following error message:
The HTML or text file that you are trying to export contains field names that do not match the field names in the specification table. This will happen if you do not click to select the "First Row Contains Column Headings" check box when you create the specification table.
Click to select the "First Row Contains Column Headings" check box in the <'tablename'> Import Specification dialog box.
Change the names for the fields in the <'tablename'> Import Specification dialog box when you create the specification table so that the field names match the field names in the table you are exporting.
This behavior is by design.
Steps to Reproduce Behavior
- Open the sample database Northwind.mdb in Microsoft Access 97. In the Database window, select the Suppliers table.
- On the File menu, click Save As/Export.
- In the Save As box, click "To an External File or Database." Click OK.
- In the "Save Table 'Suppliers' In" box, select HTML documents (*.html, *.htm), click the Save Formatted check box, and then click Export. Click OK in the HTML Output Options box.
- Create a specification table for the Suppliers HTML file using the following steps:
- On the File menu, click Get External Data, and then click Import.
- In the Import box, select HTML Documents (*.html, *.htm).
- Locate and select the Suppliers HTML file, and then click Import.
- In the Import HTML Wizard box, click Advanced, and then click Save As in the Suppliers Import Specification box.
- Click OK in the Save Import/Export Specification box.
- Click Cancel in the Suppliers Import Specification box. Click Cancel in the Import HTML Wizard box.
Create a new macro using the TransferText action with the following arguments:
Macro Name Action ------------------------- Macro1 TransferText Macro1 Actions ----------------------------------------------------- TransferText Transfer Type: Export HTML Specification name: Suppliers Import Specification Table Name: Suppliers. File Name: c:\My Documents\Suppliers.html Has Field Names: Yes
- Save and run the macro.
Note that you receive the error message mentioned in the "Symptoms" section.
Additional query words: the data being exported does not match the format described in the schema ini file
Keywords: kberrmsg kbprb KB170220