Using CDO to send email with attachment

K

Kristin Smith

What properties of the Attachment object do I need to set in CDO in order to
attach a binary file. I have used the following code :
'Example 1
With objAttach
.Type = CdoFileLink
.Position = 0
.Name = "WayneAllCounty.mdb"
.Source = "C:\Working\Access\WayneAllCounty.mdb"
End With

'Example2
With objAttach
.Type = CdoFileData
.Position = 0
.Name = "WayneAllCounty.mdb"
.ReadFromFile "C:\Working\Access\WayneAllCounty.mdb"
End With

Neither example works. The email sets sent without the attachment. Any
Ideas?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top