envoie de mail en vba

philoutri

XLDnaute Nouveau
bonjour, j'ai un listing avec dans une colonne les mails des personnes. j'aimerai sélectionner certaines afin de leur envoyer de manière groupé un message via outlook express par exemple.
ce qui suit marcherai mais j'ai un problème avec outlook car mon logiciel de messagerie est outlook express : est il possible de trouver le code pour ouvrir la messagerie qui est par défaut sur le pc où se trouve le fichier.
merci d'avance

Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Dim tableauDestinataires() As String
Dim nbDestinataires As Integer


nbDestinataires = 0
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.application")

On Error GoTo cleanup


For Each cell In Columns("n").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" And _
LCase(Cells(cell.Row, "a").Value) = "x" Then
ReDim Preserve tableauDestinataires(nbDestinataires)
tableauDestinataires(nbDestinataires) = cell.Value
nbDestinataires = nbDestinataires + 1
End If
Next cell

Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail

.To = "phlavergne47@orange.fr"
.Subject = "Info"
.Body = "Bonjour, "
.Display
.bcc = tableauDestinataires
End With
On Error GoTo 0
Set OutMail = Nothing
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
For i = 3 To 500
Cells(i, 1).ClearContents
Next

End Sub