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
|
'procedure permettant d'ajouter un rdv dans un calendrier outlook
Sub NewCalendrierAjoutRdV_ds_Calendrier_NIOLON()
'declaration des variables
Dim oOutlook As Outlook.Application
Dim oAppointment As Outlook.AppointmentItem
Dim namespaceOutlook As Outlook.Namespace
Dim DossierCalendrier As Outlook.MAPIFolder
Dim i As Integer, plateforme As String
Dim C8, C9, C10, C11, C12, C13, D15, D31, E15, F15, I1, J1, K8 As String
Dim A8, A9, A10, A11, A12, A13, H13 As String
Dim RetourPrestataire As String
Dim DebSejou As String
Dim FinSejour As String
Dim NbNuit As Integer
'gestion d'erreurs
On Error GoTo Err_Execution
'determination quelle source
For i = 20 To 23
If Cells(i, 3).Value <> "" Then
plateforme = Cells(i, 2).Value
Exit For
Else: plateforme = "direct"
End If
Next i
'on cree ensuite les objets
Set oOutlook = CreateObject("Outlook.Application")
Set namespaceOutlook = oOutlook.GetNamespace("MAPI")
'definit le dossier calendrier
'GetDefaultFolder renvoit le calendrier du compte actif
Set DossierCalendrier = namespaceOutlook.GetDefaultFolder(olFolderCalendar).Folders(1) |
Partager