Function ExportBackUp()
Dim Db As DAO.Database
Dim Qry As DAO.QueryDef
Dim rs1, rs2 As DAO.Recordset
Dim objMail As Object
Dim NomSite As String
Set Db = Application.CurrentDb
Set rs1 = Db.OpenRecordset("Select * from Sources")
rs1.MoveFirst
NomSite = rs1("title")
Set Qry = CurrentDb.QueryDefs("Extract_BackUp")
'Initialiser le Paramètre
Qry.Parameters("NomSite") = NomSite
'Ouvrir le Recordset basé sur la requête
Set rs2 = Qry.OpenRecordset(dbOpenDynaset)
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Extract_BackUp", "D:\Test.xlsm", True
End Function