Discussion: excel et outlook
Afficher un message
Vieux 12/09/2005, 10h59   #4 (permalink)
MichelXld
XLDnaute Barbatruc
 
Date d'inscription: février 2005
Messages: 3 643
Par défaut Re:excel et outlook

bonjour Matthieu , bonjour cher Jean-Pierre

les solutions proposées par Jean-Pierre fonctionnent tres bien

tu trouveras d'autres exemples dans ce lien

http://www.excel-downloads.com/html/...MichelXldsuite


pour la 2eme partie de ta question : l' envoi d'un message différé d'une heure

Sub mail_Differe_confirmationReception_Lecture()
'necessite d'activer la reference Microsoft Outlook xx.x Object Library
Dim Ol As New Outlook.Application
Dim olMail As MailItem
Set Ol = New Outlook.Application
Set olMail = Ol.CreateItem(olMailItem)
With olMail
.To = 'forum@xld.fr'
.Subject = 'Le sujet traité '
.Body = 'Bonjour , ' & vbLf & 'Vous trouverez ci joint...'
'------------------------
.DeferredDeliveryTime = Date + Time + (1 / 24) 'option pour envoi différé d'une heure
'------------------------
.OriginatorDeliveryReportRequested = True 'confirmation de réception
.ReadReceiptRequested = True 'confirmation de lecture
.Send
End With
End Sub



pour la 3eme partie de ta question

Sub NouveauRDV_Calendrier()
'nécéssite d'activer la référence Microsoft Outlook 10.0 Object Library
Dim myOlApp As New Outlook.Application
Dim MyItem As Outlook.AppointmentItem

Set MyItem = myOlApp.CreateItem(olAppointmentItem)

MyItem.MeetingStatus = olMeeting
MyItem.Subject = 'le forum xld'
MyItem.Body = '...rappel telephonique ....'
MyItem.Start = Date + 1 & ' ' & #10:00:00 AM# ' Attention : format mois/jours/année
MyItem.Duration = 30 'minutes

MyItem.Save
End Sub



bonne journée
MichelXld
MichelXld est déconnecté   Réponse avec citation