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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
| Sub ScheduleMeeting(Du_txtbox, Sujet, duree, EMAIL, chef, Corps)
'---------------------------------------------------------------------------------------
' Procedure : ScheduleMeeting
' Author : Oliv
' Date : 07/07/2017
' Purpose :
'---------------------------------------------------------------------------------------
'
If Corps Like "*Display*" Then MsgBox "go"
Dim OL As Outlook.Application
Dim myItem As Outlook.AppointmentItem
Dim myRequiredAttendee As Outlook.Recipient
Dim myOptionalAttendee As Outlook.Recipient
If UCase(Application) = "OUTLOOK" Then
Set OL = Application
Else
Set OL = CreateObject("outlook.application")
End If
Set myItem = OL.CreateItem(olAppointmentItem)
myItem.MeetingStatus = olMeeting
'myItem.Location = "Conference Room"
'Début de l'absence
myItem.Start = Du_txtbox
'myItem.End = Demande_Absence.Au_txtbox
'myItem.AllDayEvent = True
myItem.Subject = Sujet
myItem.Duration = duree
If EMAIL Like "*@*.*" Then
Set myRequiredAttendee = myItem.Recipients.Add(EMAIL)
myRequiredAttendee.Type = olRequired
End If
If chef Like "*@*.*" Then
Set myRequiredAttendee = myItem.Recipients.Add(chef)
myRequiredAttendee.Type = olRequired
End If
'Pour ajouter des destinataires optionnels
' Set myOptionalAttendee = myItem.Recipients.Add("Tout")
' myOptionalAttendee.Type = olOptional
'Pour ajouter une ressource
' Set myResourceAttendee = myItem.Recipients.add("Conference Room B")
' myResourceAttendee.Type = olResource
myItem.Body = Corps
myItem.ReminderSet = False
myItem.ResponseRequested = False
myItem.ReplyTime = False
If myItem.Body Like "*Display*" Then
myItem.Display
Else
myItem.Send
End If
End Sub
Private Sub testmeeting()
ScheduleMeeting "13/3/2009", "Congés:Peg -->13/3", 4320, "info@TOTO.fr", "DOM@TOTO.fr", "Display"
End Sub |
Partager