Bonjour,
Voici le code que j'ai récupéré et modifié pour mon fichier excel :
Sub smsetmms()
Dim MonOutlook As New Outlook.Application
Dim myMobileItem As Outlook.MobileItem
Dim chaine As String
Dim icong As Object
Dim Flds As Object
Set olApp = Outlook.Application
Set myMobileItem = olApp.CreateItem(olMobileItemSMS)
Set iConf = CreateObject("cdo.configuration")
Sheets("CR-V à finaliser").Select
For Ln = Cells(Rows.Count, 19).End(xlUp).Row To 6 Step -1
If Cells(Ln, "S").Value Like "*+33*" And Cells(Ln, "C").Value > Date + 11 And Cells(Ln, "C").Value < Date + 16 And Cells(Ln, "S").Interior.ColorIndex = 2 Then
Rows(ActiveCell.Row).Select
Set myMobileItem = olApp.CreateItem(olMobileItemSMS)
myMobileItem.To = Cells(Ln, "S").Value
myMobileItem.Body = "test"
myMobileItem.Display
Cells(Ln, "S").Interior.ColorIndex = 44
Else
GoTo LigneSuivante
End If
LigneSuivante:
Next Ln
End
Set MonOutlook = Nothing
End Sub
Le code fonctionne parfaitement sur mon pc. J’espère qu'il t'aidera...