Public Function formatDateForFileName(DateIn As Date)
'formattage dd mm yyyy
'gestion jours
On Error Resume Next
ReportDate = CDate(DateIn)
Temp = Day(ReportDate)
If (Temp < 10) Then
Temp = "0" & Temp
End If
StringDate = CStr(Temp)
'gestion mois
Temp = Month(ReportDate)
If (Temp < 10) Then
Temp = "0" & Temp
End If
StringDate = CStr(StringDate & Temp)
'gestion ann_e
Temp = Year(ReportDate)
Temp = CStr(Right(Temp, 2))
formatDateForFileName = StringDate & Temp
End Function