Mise à jour d'un calendrier SharePoint à partir d'Excel
cduc.31
Messages postés2Date d'inscriptionlundi 4 janvier 2016StatutMembreDernière intervention 5 janvier 2016
-
Modifié par NHenry le 4/01/2016 à 22:52
cduc.31
Messages postés2Date d'inscriptionlundi 4 janvier 2016StatutMembreDernière intervention 5 janvier 2016
-
5 janv. 2016 à 09:02
Bonjour,
Je dois mettre à jour un calendrier SharePoint à partir d'informations Excel.
Ma difficulté : je sais écrire sur mon calendrier, mais je n'arrive pas à accéder au calendrier "Astreinte" qui est un calendrier SharePoint.
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
EDIT : Ajout des balises de code (la coloration syntaxique). Explications disponibles ici : ICI
4 janv. 2016 à 22:53
J'hésite entre VB6 et VBA personnellement.
4 janv. 2016 à 23:01
4 janv. 2016 à 23:02
5 janv. 2016 à 09:02
C'est en VBA.
Merci