VBA export to excel from Access

N

N

Hi

I am using the following command to export the results of
a query to an excel file:
DoCmd.OutputTo acOutputQuery, "AL_Rand_Amount",
acFormatXLS, "c:\temp\export.xls", True

Is there anyway i can force this command to use a certain
template? The excel opens with the default page setup:
portrait mode with a certain setup for its margins. I want
to open with a page setup of landscape and a different
margin setting as well as font setting.
Can i do this?

Thanks
 
J

Jim/Chris

Have you tried exporting to a second hidden sheet in an
existing workbook and use sheet 1 that links to that
second sheet with all your formatting.

Jim
 

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