' code afkomstig van
'http://www.utteraccess.com/forums/printthread.php?Cat=&Board=89&main=1107240&type=thread
Private Sub CmdZendMail_Click()
Dim olapp As Object
Dim olns As Object
Dim olfolder As Object
Dim olitem As Object
Dim olattach As Object
Set olapp = CreateObject("Outlook.Application")
Set olns = olapp.GetNamespace("MAPI")
Set olfolder = olns.getdefaultfolder(6)
Set olitem = olapp.createitem(0)
Set olattach = olitem.attachments
' emailadres onvanger
olitem.To = "me@provider.com"
' emailadres ontvanger CC
'olitem.CC = "me@provider.com"
olitem.Subject = "Test zend bijlage"
olitem.body = "Tekst van de mail" & Chr(13) & Chr(10)
'Hier path en bestand naar eerste bijlage
olattach.Add "c:\temp\test.mdb", 1
'Hier eventueel nog path en bestandsnaam voor 2e bijlage
'olattach.Add "PathTo2ndFile", 1
'Hier eventueel nog path en bestandsnaam voor 3e bijlage
'olattach.Add "pathTo3rdFile", 1
olitem.display
olitem.send
Set olitem = Nothing
Set rs = Nothing
Set db = Nothing
Set olfolder = Nothing
Set olns = Nothing
Set olapp = Nothing
End Sub