Lone-wolf
XLDnaute Barbatruc
Bonjour à tous,
d'après le code, olmail.BCC inclu Nouveau.email.Value.
Comment écrire le code pour que celui-ci ne sois pas inscrit dans les copies cachée? Merci de votre aide.
Code:
Sub Messages()
Dim olApp As Outlook.Application
Dim olmail As MailItem
Dim CurrFile As String
Dim cell As Range
Dim strcc As String
Dim Chemin
ChDrive "D"
ChDir ("D:\Carnet d'adresses\")
Set olApp = Outlook.Application
Set olmail = olApp.CreateItem(olMailItem)
For Each cell In ThisWorkbook.Sheets("Liste").Range("H2:H22")
strcc = strcc & cell.Value & ";"
Next
olmail.To = Nouveau.email.Value
olmail.cc = ""
olmail.BCC = strcc
olmail.Subject = ""
olmail.Body = ""
Chemin = Application.GetOpenFilename("*.*, *.*")
If VarType(Chemin) <> 11 Then
olmail.Attachments.Add Chemin
olmail.Display
End If
End Sub
d'après le code, olmail.BCC inclu Nouveau.email.Value.
Comment écrire le code pour que celui-ci ne sois pas inscrit dans les copies cachée? Merci de votre aide.