Bonjour,

J'ai un fichier Excel ou je fait un suivi de personne ayant un CDD, j'ai fait une macro me permettant de créer un RDV sur Outlook depuis mon fichier excel avec des Inputbox:

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
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
je souhaiterais améliorer cette macro mais la j’atteins mes limites (qui ne sont pas très élevé ).

J'aimerais qu'a la place des Inputbox il y ai un code qui me remplisse du fait de ma sélection les différents items .

Par exemple je met a jours mon dossier j'ajoute une ligne (16) je voudrais qu'en sélectionnant
ma ligne le sujet se remplisse automatiquement avec la cellule I 16.

Pouvez- vous m'aider ?

Merci d'avance.

Bonne journée.