Hello
Petit complément à la discussion : http://www.developpez.net/forums/d14...r-rdv-outlook/
je voudrais que ma date du rdv soit modulable
J'essaye un mais cela ne passe pas .....
Tu aurais une idée géniale comme hier ????
Code : Sélectionner tout - Visualiser dans une fenêtre à part .Start = "#" & Cells(I, 6).Value & " 2:30:00 PM#"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 Sub NouveauRDV_Calendrier() 'Nécessite d'activer la référence "Microsoft Outlook xx.x Object Library" Dim OkApp As New Outlook.Application Dim Rdv As Outlook.AppointmentItem Dim I As Integer Dim datemod As Variant With Worksheets("RDV OUTLOOK") j = .Range("A2").End(xlDown).Row For I = 2 To j Set Rdv = OkApp.CreateItem(olAppointmentItem) If .Cells(I, 8) = "" Then .Cells(I, "f") = Format(.Cells(I, "e"), "mm-dd-yyyy") With Rdv .MeetingStatus = olMeeting .Subject = "DOSSIER - " & Cells(I, 1).Value & " - " & Cells(I, 2).Value & " - " & Cells(I, 3).Value 'Sujet de la tâche .Body = Cells(I, 4).Value 'Corps de la Relance .Location = "Chez wam" '.Start = #1/5/2015 2:30:00 PM# ' Attention : format mois/jours/année .Start = "#" & Cells(I, 6).Value & " 2:30:00 PM#" .Duration = 30 'minutes .Categories = "EMPLOI" .Save End With .Cells(I, 8) = "OUI" Set OkApp = Nothing End If Next I End With End Sub
Partager