Hi Jerid,
Not sure if this will help you in your case, but if you use
TransferSpreadsheet rather than OutputTo, it will create a new spreadsheet
in an existing workbook. For example, I use the below code to first create a
new Excel file using OutputTo, then append another table to the Excel file
as a new sheet in the same book. (Note the file name is the same in both
actions, but data is from 2 separate tables.) The new worksheet will be
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13098
named the same as the source table or query.
DoCmd.OutputTo acOutputTable, "Legacy_Pump", acFormatXLS, "c:\temp\" &
VesselName & "_Pumps.xls", 0
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"HasPlan_Pump", "c:\temp\" & VesselName & "_Pumps.xls"
--
hth,
SusanV
"Jerid B"
wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13098
news:E8633593-D16D-4F9E-AB44-7A9640C05D4F@microsoft.com...
> Is it possible to export a query or report to a particular sheet within a
> workbook?
> I tried using a macro (OutputTo) and choose the output file to:
> C:\Temp\Quote.xls"Data!"
> Workbook name is Quote.xls and the sheet is data.
> We have so many users that need this particular report, but only so many
> copies of Access here.
> I get an error saying Access can not save the outfut file and lists
> reasons.
> All reasons listed I checked are legit except possibly the location
> because
> of how I addressed the actual sheet in the output file.
> Access 2003 - Excel 2003
>
>