Bonjour,
J'ai un formulaire sur lequel il y a un bouton. Sur clic, celui-ci ouvre sous Outlook une demande de réunion comme suit :
Ce code fonctionne à l'exception du champ objet. Celui-ci devrait reprendre la concaténation de certains champs présents. Il doit y avoir une erreur de syntaxe ou autre car j'ai un message d'erreur.
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 Private Sub DemandeReunion_Click() Dim obj, objitem As Outlook.AppointmentItem Dim objet As String objet = [Empprincipal] & " - " & Format([Totalfi];"000 000") & " EUR " & Format([Contratdepret];"j-mmm-aaaa") & " / " Set obj = CreateObject("Outlook.application") Set objitem = obj.CreateItem(olAppointmentItem) With objitem .MeetingStatus = olMeeting ' Type réunion .Recipients.Add "dest1@" ' Ajout destinataire .Recipients.Add "dest2@" ' Ajout destinataire .Start = "06/02/2009 10:00" ' Début .Duration = 90 ' Durée .Subject = objet ' Sujet .Body = "Nous pourrons utiliser le numéro suivant : " ' Texte .ReminderSet = True ' rappel .ReminderMinutesBeforeStart = 15 ' rappel x minutes avant .BusyStatus = olOutOfOffice ' absent du bureau .Display ' affichage pour validation '.Save '.Send End With Set objitem = Nothing Set obj = Nothing End Sub
Merci d'avance pour votre aide.
Bien cordialement.
Partager