VBA Outlook 2000 attachment
Posted on 2004-09-10
I am writing some code that exports a table to a .csv file and need to be able to email the .csv file. I have the code to email from VBA but i havnt a clue how to add an attachment. Does anyone know how to do this?
Here is the code i have so far and the code which i thought it was to add the attachments
Dim OLAPP As Object
Dim OLMMM As Object
Set OLAPP = CreateObject("outlook.Application")
Set OLMMM = OLAPP.createitem(0)
.subject = "Stompin Export"
.To = "email@example.com"
.Body = "Netsound's Stompin Records Export (.CSV)"
If MsgBox("Do you wish to preview the email before sending?", vbQuestion + vbYesNo, "Preview?") = vbYes Then