title: Formatting outputted Excel files from Access using VBA?
body: <p>Here I have some VBA code that outputs a ton of files into Excel files. My question is, from this, is there anyway for it to Format the excel file a bit? What I would like to do is make the Columns bold and make the columns fit the size of the header as well.</p>
  
  <pre><code>Sub OutPutXL()
  
  
  Dim qdf As QueryDef
  Dim rs As DAO.Recordset
  
  Set qdf = CurrentDb.QueryDefs("OutputStudents")
  Set rs = CurrentDb.OpenRecordset("Teachers")
  
  Do While Not rs.EOF
  qdf.SQL = "SELECT * FROM Students WHERE contact='" &amp; rs!contact &amp; "'"
  
  ''Output to Excel
  DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, _
  qdf.Name, "C:\Users\chrisjones\Documents\ProjectionsFY14\Teachers\" _
  &amp; rs!contact &amp; ".xls", True
  rs.MoveNext
  Loop
  
  End Sub
  </code></pre>