I am using the following code to backup the tables on my "D" Drive
I want to add a code by which it not only save backup on my drive but also send these files to my email address XYZ@gmail.com
Dim CurrentDay As String
Dim CurrentMonth As String
Dim CurrentYear As String
CurrentDay = Day(Now)
CurrentMonth = Month(Now)
CurrentYear = Year(Now)
DoCmd.OutputTo acOutputTable, "Purchases", "ExcelWorkbook(*.xlsx)", "D:\Reports 2014\Purchase 2014 (" + CurrentDay + "-" + CurrentMonth + "-" + CurrentYear + ").xlsx", False, "", 0, acExportQualityPrint
DoCmd.OutputTo acOutputTable, "Sales", "ExcelWorkbook(*.xlsx)", "D:\Reports 2014\Sale 2014 (" + CurrentDay + "-" + CurrentMonth + "-" + CurrentYear + ").xlsx", False, "", 0, acExportQualityPrint
DoCmd.OutputTo acOutputTable, "Company", "ExcelWorkbook(*.xlsx)", "D:\Reports 2014\Company 2014 (" + CurrentDay + "-" + CurrentMonth + "-" + CurrentYear + ").xlsx", False, "", 0, acExportQualityPrint
Export_Data_Exit:
Exit Sub
Export_Data_Err:
MsgBox Error$
Resume Export_Data_Exit
End Sub