Accueil > > > MACRO POUR EXPORTER LE CALENDRIER COMPLET OUTLOOK EN FORMAT VCALENDAR (VCS)
MACRO POUR EXPORTER LE CALENDRIER COMPLET OUTLOOK EN FORMAT VCALENDAR (VCS)
Information sur la source
Description
J'aurai aimé pouvoir trouver cette option directement dans Outlook, mais apparemment ce n'était pas prévu. Il est possible d'enregistrer chaque événement un par un en format vcs (vCalendar) mais pas d'exporter tout le calendrier. Voici donc une petite macro permettant d'exporter tous les événements dans un fichier qui peut ensuite être importé dans un agenda collectif en ligne (WebCalendar par exemple). Il doit être assez simple d'en faire une version pour iCalendar.
Source
- Sub export()
-
- Dim dirLocation As String
-
- dirLocation = InputBox("Donnez un emplacement sur votre disque et un nom de fichier avec l'extsension .vcs (e.g., c:\cal.vcs). Vous pourrez importer ce fichier à partir de WEbcalendar")
- If dirLocation = Null Or Len(dirLocation) = 0 Then
- Exit Sub
- End If
-
- Dim objApplication As Outlook.Application
- Dim objNameSpace As Outlook.NameSpace
- Dim objAppointments As Outlook.MAPIFolder
- Dim objAppointment As Outlook.AppointmentItem
- Dim appointmentIndex As Integer
-
- Set objApplication = CreateObject("Outlook.Application")
- Set objNameSpace = objApplication.GetNamespace("MAPI")
- Set objAppointments = objNameSpace.GetDefaultFolder(olFolderCalendar)
-
- Open dirLocation For Output As #6
- Print #6, "BEGIN:VCALENDAR"
- Print #6, "PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN"
- Print #6, "VERSION:1.0"
- For appointmentIndex = 1 To objAppointments.Items.Count
- Set objAppointment = objAppointments.Items.item(appointmentIndex)
- Print #6, "BEGIN:VEVENT"
- If objAppointment.AllDayEvent = True Then
- Print #6, "TRANSP:1"
- End If
- Print #6, "DTSTART:" & Format(objAppointment.Start, "yyyymmdd") & "T" & Format(objAppointment.Start, "hhmmss") & "Z"
- Print #6, "DTEND:" & Format(objAppointment.Start, "yyyymmdd") & "T" & Format(objAppointment.Start, "hhmmss") & "Z"
- Print #6, "SUMMARY;ENCODING=QUOTED-PRINTABLE:" & objAppointment.Subject
- Print #6, "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & objAppointment.Body
- Print #6, "PRIORITY:" & objAppointment.Importance
- Print #6, "END:VEVENT"
-
- Next
- Print #6, "END:VCALENDAR"
- Close #6
- MsgBox "Le calendrier a été exporté dans : " & dirLocation
- End Sub
Sub export()
Dim dirLocation As String
dirLocation = InputBox("Donnez un emplacement sur votre disque et un nom de fichier avec l'extsension .vcs (e.g., c:\cal.vcs). Vous pourrez importer ce fichier à partir de WEbcalendar")
If dirLocation = Null Or Len(dirLocation) = 0 Then
Exit Sub
End If
Dim objApplication As Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objAppointments As Outlook.MAPIFolder
Dim objAppointment As Outlook.AppointmentItem
Dim appointmentIndex As Integer
Set objApplication = CreateObject("Outlook.Application")
Set objNameSpace = objApplication.GetNamespace("MAPI")
Set objAppointments = objNameSpace.GetDefaultFolder(olFolderCalendar)
Open dirLocation For Output As #6
Print #6, "BEGIN:VCALENDAR"
Print #6, "PRODID:-//Microsoft Corporation//Outlook 9.0 MIMEDIR//EN"
Print #6, "VERSION:1.0"
For appointmentIndex = 1 To objAppointments.Items.Count
Set objAppointment = objAppointments.Items.item(appointmentIndex)
Print #6, "BEGIN:VEVENT"
If objAppointment.AllDayEvent = True Then
Print #6, "TRANSP:1"
End If
Print #6, "DTSTART:" & Format(objAppointment.Start, "yyyymmdd") & "T" & Format(objAppointment.Start, "hhmmss") & "Z"
Print #6, "DTEND:" & Format(objAppointment.Start, "yyyymmdd") & "T" & Format(objAppointment.Start, "hhmmss") & "Z"
Print #6, "SUMMARY;ENCODING=QUOTED-PRINTABLE:" & objAppointment.Subject
Print #6, "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & objAppointment.Body
Print #6, "PRIORITY:" & objAppointment.Importance
Print #6, "END:VEVENT"
Next
Print #6, "END:VCALENDAR"
Close #6
MsgBox "Le calendrier a été exporté dans : " & dirLocation
End Sub
Conclusion
Bon, j'espère que ce sera utile à certains
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
outlook 2002 : exporter des elements du calendrier [ par hydrocephale ]
bonjour,j'ai besoin d'exporter regulierement vers une feuille excel un certain nombre d'elements du calendrier d'outlook. cela se fait sans probleme e
Extraction du calendrier outlook en vcalendar par une marco [ par sayann ]
Bonjour,J'aimerai pouvoir générer automatiquement un fichier vcalendar à l'aide d'une macro, à partir de outlook 2003 et cela pour
Exporter les dates d'une bdd dans le calendrier outlook [ par rdeloozc ]
Est ce que quelqu'un saurait comment exporter des dates présentes dans une table access dans le calendrier outlook??? Siq uelqu'un a une idée, je ser
consulter en vb calendrier ajouté sur outlook [ par claude93 ]
bonjour, je ne trouve pas comment aller consulter et modifier les rendez-vous en vb sur un calendrier ajouté Outlook. quelqu'un pourrait-il m'aider ?
Exporter un calendrier outlook en html [ par max59172 ]
Salut à tous, pour le boulot je dois créer l'exportation automatique d'un calendrier en html. Je pense donc créer un .bat qui supprime l'ancien calend
mportation d'une table access dans le calendrier outlook [ par ls8ls8 ]
Bonjour, J'exporte manuellement un fichier structuré .txt provenant d'un agenda Lotusnotes 6.02. Je le récupère dans access sous forme simplifiée (7
Exporter [ par sayann ]
Bonjour, J'aimerai pouvoir extraire les données contenues dans un agenda/calendrier outlook à l'aide d'un script php. Quelqu'un a-t-il une idée ? J
calendrier Outlook dans application web [ par donykas ]
Bonjour, Salem Alaykom, l'un des modules de l'application web de mon PFE consiste à afficher la calendrier de planification des réunions de la socié
Calendrier outlook en html [ par rigafr ]
Bonjour, Je cherche un code en vbscript qui me permettrait "d'exporter" en html le calendrier d'une bal quelconque (évidemment j'ai les droits qu'il f
Calendrier Outlook [ par juliencolomb ]
Bonjour,Je fais une petite automatisation pour mon boulot sous OutlookLe principe j'ai régulièrement différentes taches sur une période de 3 semainesM
|
Derniers Blogs
XNA IS DEAD!XNA IS DEAD! par richardc
Depuis la semaine dernière (et grâce aux TechDays 2012), je me penche activement sur la nouvelle version de Windows, aka Windows 8. Vous me direz, il était temps puisque la première preview date de Septembre dernier.
OK. Remarquez, on n'en est qu'aux...
Cliquez pour lire la suite de l'article par richardc TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 !TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 ! par ROMELARD Fabrice
Speakers: Fabrice Meillon et Stanislas Quastana Cette session est basée entièrement sur celle donnée lors de la BUILD cet hiver. Il n'y a pas d'ajout d'information en rapport avec cet évènement passé. Windows 8 Server sera intégralem...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [HTML5] AUTOUR DU W3C : NOUVEAUX STANDARDS ET WEB MOBILE (LILLE)[HTML5] AUTOUR DU W3C : NOUVEAUX STANDARDS ET WEB MOBILE (LILLE) par Gio
Je m'y prends un peu tard je sais, mais bon je suis développeur web et donc hyper fainéant ! Toujours dans le cadre des technologies émergentes, ici HTML5, parce qu'on aime HTML5 chez Wyg , nous seront présent, le vieux ( Aurélien V.) et moi, pour pr...
Cliquez pour lire la suite de l'article par Gio [WP7] DYNAMICALLY CHANGE STARTUP PAGE[WP7] DYNAMICALLY CHANGE STARTUP PAGE par KooKiz
Let's say that you want to allow the user to customize the startup page of your application. You can easily change the startup page by editing the 'NavigationPage' attribute in the manifest file. But the manifest cannot be modified once the applicatio...
Cliquez pour lire la suite de l'article par KooKiz
Logiciels
DocTranslate (V3.1.0.0)DOCTRANSLATE (V3.1.0.0)DocTranslate est un traducteur de document Microsoft Word, PowerPoint et Excel. Il permet d'autom... Cliquez pour télécharger DocTranslate Tribler (2012)TRIBLER (2012)Tribler est un client pair à pair (P2P/Peer-to-Peer) open source avec la capacité de regarder des... Cliquez pour télécharger Tribler OneSwarm (2012)ONESWARM (2012)Le peer-to-peer qui protège votre vie privée, c'est OneSwarm.
Ce logiciel de peer-to-peer crypté... Cliquez pour télécharger OneSwarm PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System
|