Hi Patrick
Do you have a account On the 2003 machine in Outlook Express ?
If not you must use the commented blue code lines in my examples
http://www.rondebruin.nl/cdo.htm
--
Regards Ron De Bruin
http://www.rondebruin.nl
"...Patrick" <[email protected]> wrote in message news:[email protected]...
> Hello,
>
> with a very good code from Ron DEBRUIN, i'm able to copy a list of mail in a BCC but if it works with Excel 2000, i have a problem
> with Excel 2003 and a message appears.
> This is a copy screen from my code, can you help me.
> http://users.skynet.be/fa401972/fichier_erreur.zip
>
>
> Thanks
>
> Patrick
>
> my code:
>
> Sub Mail_Small_Text_CDO() ' from Ron Debruin
> Dim iMsg As Object
> Dim iConf As Object
> Dim strbody As String
> Dim Txt, Txt2, Lastrow
> Dim I As Integer
> Dim Debut ' debut du nom de fichier (répertoire)
> Dim Scan ' suite du nom de fichier à envoyer
> Dim Tarif ' idem
> Dim Texte
> Dim Destinataire, ObjetMail
> Lastrow = Range("G65000").End(xlUp).Row
> ObjetMail = [I8].Value
> ' copie invisible pour palier au manque de trace dans éléments envoyés
> Dim invisible
> 'Invisible = Range("I6").Value
> '.BCC = Invisible ' pour une trace de l'envoi
> For I = 2 To Lastrow
> invisible = invisible & Cells(I, 7) & ";"
> Next
> Destinataire = Cells(I, 7).Value
> Set iMsg = CreateObject("CDO.Message")
> Set iConf = CreateObject("CDO.Configuration")
> ActiveSheet.Shapes("TexteClient").Select
> Txt = Selection.Characters.Text & " " & Time
> ActiveSheet.Shapes("averti256").Select
> 'Txt2 = Selection.Characters.Text
> strbody = Txt ' & Chr(13) & [I8].Value ' I8 = adresse net de t&p
> 'strbody = strbody & Chr(13) & Txt2
> With iMsg
> Set .Configuration = iConf
> '.To = Destinataire ' "[email protected]" ' not a real adress :-))
> .CC = ""
> .BCC = invisible
> '.BCC = destinataire ' pour une trace de l'envoi
> .from = """les divins dessous"" <[email protected]>" ' not a real adress :-))
> .Subject = ObjetMail
> .TextBody = strbody
> '.addAttachment Debut & Scan
> '.addAttachment Debut & Tarif
> .Send
> 'Scan = "scan_": Texte = "texte_": Tarif = "tarif_"
> End With
> Set iMsg = Nothing
> Set iConf = Nothing
> [A3].Select
> End Sub
>
Bookmarks