OutputTo

C

Craig

The OutputTo method prompts the user with a "Save as"
dialog box and allows the user to save the file where they
would like. However, it doesn't allow the user to save
the output file as a particular 'type' (ie, I'm using
Access 97, and I'd like to save the output as an Excel 95
spreadsheet).

The "TransferSpreadsheet" method allows the user to
designate a file type (ie, Excel 8-10, etc.), but doesn't
allow the user to specify where they would like to save
the file (a response to an earlier post of mine suggests
user the code at mvps.org, which I may have to resort to).

Can you designate a file type with the 'OutputTo' method,
or is 'TransferSpreadsheet' a better way to go??

Thanks.
 
A

Alex Ivanov

OutputTo method should give you the ability to specify both type and
location.
If you don't specify the OutputFormat in the parameters list then Access
should prompt the user for it.

DoCmd.OutputTo acOutputQuery, "MyQry" 'Prompts for format and filename
DoCmd.OutputTo acOutputQuery, "MyQry", acFormatXLS 'Prompts for filename
only
DoCmd.OutputTo acOutputQuery, "MyQry", , "C:\output.xls" 'Prompts for
format only
DoCmd.OutputTo acOutputQuery, "MyQry", acFormatXLS, "C:\output.xls" 'Does
not prompt for anything
 
J

John Nurick

Hi Craig,

As far as I can remember, OutputTo uses the old Excel 5.0/95 file format
anyway. Can Excel 95 open the workbooks it produces?
 
D

david epsom dot com dot au

As far as I can remember, OutputTo uses the old Excel 5.0/95 file format
anyway. Can Excel 95 open the workbooks it produces?

Not even that. Last I looked, it used BIF ?Binary
Interchange Format? Excel will load the file without
a murmur. And it is a generic spreadsheet format accepted
by other spreadsheet programs and viewers, older than
Excel 95, but ACCESS is not able to re-load the file
at all.


I <think> Excel 95 will load the file without comment.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top