Automatically convert Access Report to Excel

  • Thread starter Thread starter Guest
  • Start date Start date
You can do it with this code but be warned that the formatting is far from
perfect:

Function RptToExcel()
On Error GoTo RptToExcel_Err

DoCmd.OutputTo acReport, "RptTest", "MicrosoftExcelBiff8(*.xls)",
"c:\temp\test.xls", False, "", 0


RptToExcel_Exit:
Exit Function

RptToExcel_Err:
MsgBox Error$
Resume RptToExcel_Exit

End Function


Bob Galway
 
Back
Top