Microsoft KB Archive/96891

= ACC: TransferSpreadsheet Action Does Not Add File Extension =

Article ID: 96891

Article Last Modified on 5/9/2003

-

APPLIES TO


 * Microsoft Access 1.0 Standard Edition
 * Microsoft Access 1.1 Standard Edition
 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q96891



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
The TransferSpreadsheet action requires a file type and file name to export data to a spreadsheet. The file name tells Microsoft Access what to name the spreadsheet file that will hold the exported data. If you do not specify an extension in this file name, Microsoft Access will not add the appropriate extension for the file format to which you are exporting.



RESOLUTION
By not automatically writing a file extension, you are able to specify any extension you like (for example, .EXE, .DAT, and .INI).



STATUS
Microsoft has confirmed this to be a problem in Microsoft Access versions 1.x and 2.0. This problem no longer occurs in Microsoft Access for Windows 95 version 7.0. In Microsoft Access 7.0, when you choose a specific file type, Microsoft Access automatically adds the file extension for you.



Steps to Reproduce Behavior
 Create a table called Table1 and add some fields and example data.  Create the following macro:

     Macro Name      Action ---     Transfer It     TransferSpreadsheet

Transfer It Actions TransferSpreadsheet Transfer Type: Export Spreadsheet Type: Microsoft Excel Table Name: Table1 File Name: TestIt Has Field Names: No                        Run the macro.

A Microsoft Excel spreadsheet file will be created in the current directory and the file will be called TESTIT, not TESTIT.XLS.

