Een familie van Microsoft-spreadsheetsoftware met hulpprogramma's voor het analyseren, in kaart brengen en communiceren van gegevens.
Hoi Henk,
' Plak onderstaande in een module
' Wijzig mail.kpnmail.nl in je eigen SMPT server (uitgaande mail)
' Verander ******@ikzelf.nl in je eigen e-mailadres (2x)
Option Explicit
Sub Send_mail()
'e-mail verzenden zonder e-mail programma (met CDO)
'Bron: http://www.rondebruin.nl/cdo.htm
Dim iMsg As Object
Dim iConf As Object
Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.kpnmail.nl"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "******@ikzelf.nl"
.Cc = Empty
.Bcc = Empty
.From = """Mail vanuit Excel""<******@ikzelf.nl>"
.Subject = Cells(1, 1)
.Textbody = Cells(2, 1) & vbNewLine & Cells(3, 1)
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub
Succes ermee.
Groeten Ronald.