Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting to a formated Excel 97 document

Status
Not open for further replies.

eclipse33

Programmer
Apr 13, 2001
94
CA
Hi,

Here is what I need to do...

From the click of a buuton in Access 97 I need to export the data from a specific query to Excel but...

1) This Excel document needs to be formated (one field must be blacked out)

Also the same number of records will not alway be exported, I'm not sure if that matters. (ie maybe 1 record today but 5 tomorrow)

This is the code I am using now...

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "All Appointments", "C:\All_Appointments.xls", True

newExcelFile = "C:\All_Appointments.xls"

retValue = Shell("C:\Program Files\Microsoft Office\Office\Excel.EXE " & newExcelFile, 1)

This code exports fine but I need to know how to format the doc from Access?

Thanks [smurf]
eclipse33
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top