Export To Excel 2003 Version

fenhow

Registered User.
Local time
Today, 00:09
Joined
Jul 21, 2004
Messages
599
Hi, I am using the following code to export the results of a query to a MS Excel Workbook. The problem is it is exporting in a format other than 2003. Can someone tell me why and how I can get it to save the workbook as an Office 2003 document?

Thanks.

Fen How

Function ExportExceltoQB()

Dim strdate As String
Dim sTime As String

strdate = Format$(Date, "mmddyy")
sTime = Format(DateTime.Now, "hhmm")

DoCmd.SetWarnings False
DoCmd.OutputTo acQuery, "QUICKBOOKS QRY All Invoices Send To QB", "MicrosoftExcelBiff8(*.xls)", "C:\Users\Fenwick How\Desktop\QuickBooks Invoice Export" & " " & strdate & "_" & sTime & ".xls", False, "", 0
DoCmd.SetWarnings True

End Function
 

Users who are viewing this thread

Back
Top Bottom