Question : Export Access to Excel format spreasdsheets

I have the code below that works great, divides an access query into several different excel reports and saves them to a drive.
My question is there any way for me to add formatting during this process or is something I have to do in Excel after all the files have been updated?
Formatting items I would like : change the font to Times New Roman, size 10, bold the field names (row 1)
Thank you in advance for any assistance.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
Private Sub Command1_Click()
  On Error GoTo Err_Command1_Click
 
Dim rst As DAO.Recordset
Dim Path As String
Dim StrBU As String
Dim intDcode As String
Dim strQry As String
Dim StrExt As String
Dim strFile As String
Dim qDef As DAO.QueryDef
 
 
Err.Clear
On Error Resume Next
Set qDef = CurrentDb.QueryDefs("Birthday Report")
If Err.Number <> 0 Then Set qDef = CurrentDb.CreateQueryDef("Birthday Report")
On Error GoTo 0
 
strQry = "SELECT Departments1.[RestNumber]FROM Departments1 ORDER BY Departments1.[RestNumber];"
Set rst = CurrentDb().OpenRecordset(strQry, dbOpenDynaset)
rst.MoveLast
rst.MoveFirst
 
 
Do While Not rst.EOF
Path = "C:\RestaurantReports\"
StrBU = rst("RestNumber")
'StrExt = "_EmployeeRoster_" & Me.ExportDate & ".xls"
StrExt = " - July Birthday Report" & ".xls"
strFile = Path & StrBU & StrExt
intDcode = rst("RestNumber")
qDef.SQL = "SELECT * FROM QryBirthdayReport WHERE RestNumber = " & intDcode & ""
 
DoCmd.OutputTo acOutputQuery, "Birthday Report", acFormatXLS, strFile, False

rst.MoveNext
Loop
 
MsgBox ("Export Complete")
Set rst = Nothing
 
Exit_Command1_Click:
    Exit Sub
 
Err_Command1_Click:
    MsgBox Err.Description
    Resume Exit_Command1_Click

End Sub

Answer : Export Access to Excel format spreasdsheets

Suppose problem is in transport. Switch back to Exchange transport and autoreply in Outlook shoul working properly
Random Solutions  
 
programming4us programming4us