Dale,
I had the exact same question some time ago and found the code below which is almost verbatim. I'm afraid I cannot remember the source, but it may have been in Microsoft's own help manual. qQuery and gFileName are variables I set in another part of my code.
------------------------------------------------
Function Excel_Output_BuildOutput()
On Error GoTo Excel_Output_BuildOutput_Err
With CodeContextObject
DoCmd.OutputTo acQuery, gQuery, "MicrosoftExcel(*.xls)", gFileName, False
DoCmd.Beep
MsgBox "Excel Output Complete", vbInformation, "Finished"
End With
Excel_Output_BuildOutput_Exit:
Exit Function
Excel_Output_BuildOutput_Err:
MsgBox Error$
Resume Excel_Output_BuildOutput_Exit
End Function
-----------------------------------------------
Function GetExcel()
Dim MyXL As Object ' Variable to hold reference to Microsoft Excel.
Dim ExcelWasNotRunning As Boolean ' Flag for final release.
' Test to see if there is a copy of Microsoft Excel already running.
On Error Resume Next ' Defer error trapping.
' Getobject function called without the first argument returns a
' reference to an instance of the application. If the application isn't
' running, an error occurs. Note the comma used as the first argument
' placeholder.
Set MyXL = GetObject(, "Excel.Application"

If Err.Number <> 0 Then ExcelWasNotRunning = True
Err.Clear ' Clear Err object in case error occurred.
' Check for Excel. If Excel is running,
' enter it into the Running Object table.
DetectExcel
' Set the object variable to reference the file you want to see.
Set MyXL = GetObject(gFileName)
' Show Microsoft Excel through its Application property. Then
' show the actual window containing the file using the Windows
' collection of the MyXL object reference.
MyXL.Application.Visible = True
MyXL.Parent.Windows(1).Visible = True
' If Microsoft Excel was not already running when you started,
' close it using the Application property's Quit method.
' When you try to quit Excel, the Excel title bar blinks and
' Excel displays a message asking if you want to save any loaded files.
If ExcelWasNotRunning = True Then
MyXL.Application.Quit
End If
Set MyXL = Nothing ' Release reference to the application and spreadsheet.
End Function
------------------------------------------------
Function DetectExcel()
' Procedure dectects a running Excel and registers it.
Const WM_USER = 1024
Dim hWnd As Long
' If Excel is running this API call returns its handle.
hWnd = FindWindow("XLMAIN", 0)
If hWnd = 0 Then ' 0 means Excel not running.
Exit Function
Else
' Excel is running so use the SendMessage API function to enter it in
' the Running Object Table.
SendMessage hWnd, WM_USER + 18, 0, 0
End If
End Function