Ne pas afficher les horaires à l'impression dans outlook
s
Bonjour,
J'imprime un calendrier outlook et je voudrais que les heures n'apparaissent pas
ex lundi : 08:30 -09:00 * 14:00 - 16:20 etc.
Est-ce possible de ne pas afficher les plages horaires en début d'événement svp ? Peut-être en vba ?
Je vous remercie de votre aide
Une autre question : Comment faire un retour à ligne dans un événement
J'ai un code sur excel qui me permet de créer un événement dans le calendrier outlook, j'utilise chr(10) et vbCr mais ca ne fonctionne pas.
Voici les lignes
BilanL = " => " & Cells(254, jL).Value
BilanL1 = " => " & Cells(255, jL).Value
BilanL2 = " Repos : " & Cells(286, jL).Value & vbCr & " Abs : " & Cells(289, jL).Valu
evt.Subject = BilanL & vbCr & BilanL2
Voici le code complet
Sub HorairesVersOutlook()
Dim mot As String: Dim mot1 As String: Dim SujetR As String: Dim mot2 As String
Dim DateDebut As String: Dim datefin As String: Dim comb As String: Dim sujet As String
Dim WordApp As Object: Dim WordDoc As Object: Dim jL As Integer: Dim BilanL As String
DateDebut = Date - 1: datefin = Date + 30
'Exit Sub
For jL = 5 To 382 'Parcoure les colonnes
If Cells(55, jL).Value >= CDate(DateDebut) And Cells(55, jL).Value <= CDate(datefin) Then ' si la date de la cellule active est comprise entre la date de début et de fin
BilanL = " => " & Cells(254, jL).Value
BilanL1 = " => " & Cells(255, jL).Value
BilanL2 = " Repos : " & Cells(286, jL).Value & vbCr & " Abs : " & Cells(289, jL).Value
Dim olApp As Outlook.Application
Dim calendrier As Outlook.Folder
Dim evts_trouvés As Outlook.Items
Dim evt As Outlook.AppointmentItem
Dim filtre As String
Dim date_rech As Date
Dim evt_ok As Boolean
'définition application
Set olApp = Outlook.Application
'affectation calendrier
Set calendrier = olApp.Session.GetDefaultFolder(olFolderCalendar)
'recherche des événements correspondant à une date
date_rech = CDate(Cells(55, jL).Value)
filtre = "[Start] > '" & Format(date_rech, "ddddd") & " 00:01" & "'" & "And" & "[Start] < '" & Format(date_rech, "ddddd" & " 23:59") & "'"
'filtre = "[Start] = '" & Format(date_rech - 1, "ddddd") & "'" & "And" & "[Start] < '" & Format(date_rech, "ddddd") & "'"
Set evts_trouvés = calendrier.Items.Restrict(filtre)
'analyse des événements trouvés
evt_ok = False
For Each evt In evts_trouvés
'If evt.AllDayEvent Then
SujetR = MajSansAccent(evt.Subject)
'MsgBox SujetR
If SujetR Like "*=>*" Then
evt_ok = True 'MsgBox "événement existe au " & evt.Start
evt.Delete
End If
'End If
Next evt
date_rech = CDate(Cells(55, jL).Value)
filtre = "[Start] > '" & Format(date_rech, "ddddd") & " 00:01" & "'" & "And" & "[Start] < '" & Format(date_rech, "ddddd" & " 23:59") & "'"
'filtre = "[Start] = '" & Format(date_rech - 1, "ddddd") & "'" & "And" & "[Start] < '" & Format(date_rech, "ddddd") & "'"
Set evts_trouvés = calendrier.Items.Restrict(filtre)
'analyse des événements trouvés
evt_ok = False
For Each evt In evts_trouvés
'If evt.AllDayEvent Then
SujetR = MajSansAccent(evt.Subject)
'MsgBox SujetR
If SujetR Like "*=>*" Then
evt_ok = True 'MsgBox "événement existe au " & evt.Start
evt.Delete
End If
'End If
Next evt
Set evt = calendrier.Items.Add(olAppointmentItem)
evt.Subject = BilanL & vbCr & BilanL2
evt.AllDayEvent = False
evt.Start = date_rech & " 06:00"
evt.ReminderSet = False
evt.Location = ""
evt.Duration = 120 'minutes
evt.Categories = "PAIN"
evt.save
Set evt1 = calendrier.Items.Add(olAppointmentItem)
evt1.Subject = BilanL1
evt1.AllDayEvent = False
evt1.Start = date_rech & " 22:00"
evt1.ReminderSet = False
evt1.Location = ""
evt1.Duration = 60 'minutes
evt1.Categories = "PAIN"
evt1.save
End If
Next
On Error GoTo 0
Set xOutMail = Nothing: Set xOutApp = Nothing
Exit Sub
End Sub
Cordialement