1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
Function CreerReunion(FexcWks As Object, FlngRow As Long) As Object
' colonne 1 Reference de la reunion
' colonne 2 Date de reservation
' colonne 3 Personne concernée
' colonne 4 Nom de la salle
' colonne 5 creneau réservé date heure
' colonne 6 Mofif reunion
' colonne 7 Statut de la demande
' colonne 8 Nom outlook de la salle
' colonne 9 Adreese mail de la salle
Dim FReference As String
Dim FDate As String
Dim FPersConcernee As String
Dim FNomSalle As String
Dim FHoraire As String
Dim FMotif As String
Dim FnomSalleOutlook As String
Dim FmailSalleOutlook As String
Dim FReunion As Object
Dim FRessourceRequise As Object
Dim FDateOutlook As Date
FReference = FexcWks.cells(FlngRow, 1)
FDate = FexcWks.cells(FlngRow, 2)
FPersConcernee = FexcWks.cells(FlngRow, 3)
FNomSalle = FexcWks.cells(FlngRow, 4)
FHoraire = FexcWks.cells(FlngRow, 5)
FMotif = FexcWks.cells(FlngRow, 6)
FnomSalleOutlook = FexcWks.cells(FlngRow, 8)
FmailSalleOutlook = FexcWks.cells(FlngRow, 9)
'FmailSalleOutlook = "CAP AMPERE-MUT-A00-098-MODULABLE (16p) (26p debout)" 'test
FDateOutlook = DateHeureDebutVersOutlook(FexcWks.cells(FlngRow, 2), FexcWks.cells(FlngRow, 5))
Set FReunion = Nothing
Set FReunion = Application.CreateItem(olAppointmentItem)
FReunion.MeetingStatus = olMeeting
FReunion.Subject = "Personne concernée : " & FPersConcernee & "--" & FMotif
FReunion.Location = FNomSalle & " -> " & FnomSalleOutlook
FReunion.Start = FDateOutlook
FReunion.Duration = MinutesDiffHoraires(FHoraire)
FReunion.Organizer = FPersConcernee
FReunion.Body = "Référence : " & FReference & vbCrLf & _
"Personne concernée : " & FPersConcernee & vbCrLf & _
"Sujet : " & FMotif & vbCrLf & _
"Salle : " & FReunion.Location
Set FRessourceRequise = FReunion.Recipients.Add(FmailSalleOutlook)
FRessourceRequise.Type = OlRessource
Set CreerReunion = FReunion
End Function |
Partager