vato69 | voici mon code quelqu'un pourrait t-il me dire ce qu'il va pas?
Code :
- Sub IMPORTERcalendrier()
- Dim outlook_application As New Outlook.Application
- Dim outlook_mapi As NameSpace
- Dim outlook_folder As MAPIFolder
- Dim objets_calendrier As Outlook.Items
- Dim occurence_calendrier As Outlook.AppointmentItem
- Dim propriete_calendrier As Outlook.ItemProperty
- Dim WSHShell
-
- Dim v_titre, v_descriptif, v_datedeb, v_datefin As String
-
- Set outlook_mapi = outlook_application.GetNamespace("MAPI" )
- Set outlook_folder = outlook_mapi.GetDefaultFolder(olFolderCalendar)
- Set objets_calendrier = outlook_folder.Items
- Set occurence_calendrier = objets_calendrier.Item(1)
- Set WSHShell = CreateObject("wscript.Shell" )
-
-
-
- Open "C:\calendrier.txt" For Input As #1
- Input #1, v_titre, v_descriptif, v_datedeb, v_datefin
-
- With occurence_calendrier
- .Subject = v_titre
- .Body = v_descriptif
- .Start = v_datedeb
- .End = v_datefin
- .Save
- End With
- WSHShell.Run Trim(occurence_calendrier.Subject), 1, False
- WSHShell.Run Trim(occurence_calendrier.Body), 1, False
- WSHShell.Run Trim(occurence_calendrier.Start), 1, False
- WSHShell.Run Trim(occurence_calendrier.End), 1, False
- WSHShell.Run Trim(occurence_calendrier.Save), 1, False
-
- Set occurence_calendrier = Nothing
- Set outlook_folder = Nothing
- Set outlook_mapi = Nothing
- Set outlook_application = Nothing
- Set objets_calendrier = Nothing
- Set WSHShell = Nothing
- End Sub
|
|