scudi
Messages postés2Date d'inscriptionmardi 21 janvier 2003StatutMembreDernière intervention31 octobre 2007
-
31 oct. 2007 à 10:22
cs_epaminondas
Messages postés26Date d'inscriptionvendredi 8 décembre 2000StatutMembreDernière intervention 9 août 2008
-
20 avril 2008 à 14:36
Bonjour,
J'ai crée une macro Excel qui permet d'envoyer un mail (ouverture de outlook et envoi de mail).
Mon probleme est que j'arrive pas à sauter des ligne dans le corp de mon texte Outlook :
Voici mon code :
Sub Outlook()
'********************************************************************************
'La fonction sert a envoyer un mail via excel en définissant tous les attribut
'********************************************************************************
Dim OLF As Outlook.MAPIFolder, olMailItem As Outlook.MailItem
' MESsages = MSG11 & MSG12 & MSG13 & MSG14
Set OLF = GetObject("", "Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
Set olMailItem = OLF.Items.Add
'******************************************************
'Avec la fonction MailItem défini par olMailItem
'Subject = objet du mail
'.to = destinataire du mail
'.cc = copie du mail
'.bcc = copie caché du mail
'.body = le corps du mail
'******************************************************
With olMailItem
.Subject = "Fichier rejets RESERVEA"
'.To = "[mailto:xx@xx.com xx@xx.com]"
'.To = "[mailto:xx@xx.com xx@xx.com]"
'.To = "[mailto:xx@xx.com xx@xx.com]"
.CC = "[mailto:xx@xx.com xx@xx.com]"
.Body = "Ci-joint le fichier des rejets RESERVEA complété à J-1"
.Attachments.Add "V:\BDDF\DSI\PMS\DPS\TMACGEN\Homologation-Gestion\GESTIONNAIRES\VEL\Suivi gestionnaire\POINTAGE\REJETS_Reservea2007.xls" ' & SOCiete & "" & Nomvar, olByValue, , "C:\Documents and Settings\X074310\Bureau\Image0001.JPG"
.OriginatorDeliveryReportRequested = False
.ReadReceiptRequested = False
.Send
End With
Set ToContact = Nothing
Set olMailItem = Nothing
Set OLF = Nothing
End Sub