VBA export to excel from Access

  • Thread starter Thread starter N
  • Start date Start date
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
 
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
 
Back
Top