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
| Sub Creation_RDV()
Dim objoutlook As Outlook.Application
Dim objreunion As Outlook.AppointmentItem
Dim objexplorer As Outlook.Explorer
Dim strmail, strsujet, strdate, strduration, strbody As String
Set objoutlook = Outlook.Application
Set objexplorer = objoutlook.ActiveExplorer
Set objreunion = objoutlook.CreateItem(olAppointmentItem)
strmail = InputBox("personnes à ajouter", "créer un RDV Outlook etape 1: 'mail'", "valeur par défaut")
strsujet = InputBox("sujet du Rdv", "créer un RDV Outlook etape 2")
strdate = InputBox("Date de rappel, format: date heures", "créer un RDV Outlook etape 3")
strduration = InputBox("Durée", "créer un RDV Outlook etape 4")
With objreunion
.MeetingStatus = olMeeting
.Recipients.Add (strmail)
.Subject = strsujet
.Start = strdate
.Duration = strduration
.Display
End With
Set objoutlook = Nothing
Set objreunion = Nothing
Set objexplorer = Nothing
End Sub |
Partager