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
| Sub Ajout_Astreinte_Calendrier()
Dim oOutlook As Outlook.Application
Dim oAppointment As Outlook.AppointmentItem
Dim myreciient As Outlook.Items
Dim namespaceOutlook As Outlook.Namespace
Dim DossierCalendrier As Outlook.MAPIFolder
Dim Dernligne As Integer
Dim i As Integer
Dim debastreinte As Date
Dim finastreinte As Date
'gestion d'erreurs
On Error GoTo Err_Execution
'on crée ensuite les objets
Set oOutlook = CreateObject("Outlook.Application")
Set namespaceOutlook = oOutlook.GetNamespace("MAPI")
'
'définit le dossier calendrier
Set myrecipient = namespaceOutlook.CreateRecipient("Astreinte")
myrecipient.Resolve
If myrecipient.Resolved Then
Set DossierCalendrier = namespaceOutlook.GetSharedDefaultFolder(myrecipient, olFolderCalendar)
End If |
Partager