Attachments Object does not support Add method?

Joined
Dec 17, 2008
Messages
2
Reaction score
0
I am trying to add an attachment to e-mails created and customized based on data in an Oracle table. I have an ADODB connection object that grabs the data -- no problems there.

The issue is that when I try to add attachments to my mail item object, I get an error -- Run time error 438, object doesn't support this property or method -- on the add attachments statement.

Any suggestions?

Set outlook_app = CreateObject("Outlook.Application")

While Not medical_schools.EOF

' Filter the check data to get the row of the current institution
check_data.Filter = "inst_id=" & institutions!inst_id
check_data.MoveFirst

' Create the message.
Set outlook_msg = outlook_app.CreateItem(olMailItem)

With outlook_msg

' Add the To recipient(s) to the message.
Set outlook_recip = .Recipients.Add(check_data!email_addr)
outlook_recip.Type = olTo


' Set the Subject and Importance of the message.
.Subject = "Data Verification - " & check_data!inst_name

.Attachments.Add check_data!attach_path


End With

' Build the message body then send

Thank you for your help.
 

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