HI everybody,
I am new to vba. I try to send an active workbook " order template" via mail but I keep getting error message 440. Can somebody tell me what I am doing wrong.
Thansk for helping
I am new to vba. I try to send an active workbook " order template" via mail but I keep getting error message 440. Can somebody tell me what I am doing wrong.
Thansk for helping
VBA Code:
Dim objoutlook As Object
Set objoutlook = CreateObject("outlook.application")
Dim objemail As Object
Set objemail = objoutlook.createitem(olmailitem)
With objemail
.to = "[EMAIL]xxxx@live.com[/EMAIL]"
.Subject = "Bestelling Techniek"
.body = "beste"
.Attachments = ThisWorkbook
.display
End With
Range("A2:I300").Select
Selection.ClearContents
End Sub
Last edited by a moderator: