Hi Guys
I used below code to export my Employee table to excel. but below code just shows the result in excel.
Code:
Dim curPath As String Dim xlApp As Object
curPath = CurrentProject.Path & "\Lec_Details - " & Format(Date, "mm-dd-yyyy")
DoCmd.TransferSpreadsheet acExport, 10, "Employee", curPath, -1
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open (curPath)
xlApp.Visible = True
i have two problems.
1.How can i set a default location/path to save the excel? (D:\Backup\
2.How to export the table with formatting and layout?