modify as needed....
Code:
'---------------
Public Sub ExportXLFile()
'---------------
Dim xl As Excel.Application
dim vFile
vFile = "c:\folder\MyFile.xls"
'export the file
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "qsQuery", vFile, True
'now edit/format the data
Set xl = CreateObject("excel.application")
With xl
.Visible = True
.Workbooks.Open vFile
'format all headers
.Cells.Select
.Cells.EntireColumn.AutoFit
'colorize the headers
.Range("A1").Select
.Range(.Selection, .Selection.End(xlToRight)).Select
With .Selection.Interior
.Color = vbYellow
.Pattern = xlSolid
End With
.Range("A1").Select
.activeworkbook.save
End With
Set xl = Nothing
End Sub