Some interesting reading...
http://support.microsoft.com/default...b;en-us;208838
For a single report:
Function basSendReportToExcel()
On Error GoTo basSendReportToExcel_Err
' Output a single report to Excel
DoCmd.OutputTo acReport, "Pledge Listing",
"MicrosoftExcelBiff8(*.xls)", "C:\Documents and
Settings\user\Desktop\xlsReport.xls", False, "", 0
basSendReportToExcel_Exit:
Exit Function
basSendReportToExcel_Err:
MsgBox Error$
Resume basSendReportToExcel_Exit
End Function
Yes, I read that you wanted to do this in a macro. Except you can't
cut & paste steps from a macro to anywhere. Otherwise, if you have to
use macros, check out the OutputTo command.
If you're outputting a lot of reports to the same SS, you might want to
check out something like this:
Public Sub EnumerateReports()
Dim aobj As AccessObject
For Each aobj In CurrentProject.AllReports
'--process the report here - export or whatever.
DoCmd.OutputTo acReport, aobj.Name,
"MicrosoftExcelBiff8(*.xls)", "C:\Documents and
Settings\user\Desktop\xlsReport.xls", False, "", 0
Next aobj
End Sub