Send email attachment

mtagliaferri

Registered User.
Local time
Today, 13:35
Joined
Jul 16, 2006
Messages
550
I have the following code to send a email with outlook, what I need is to automatically collect a attachment named commissions located in C:document and settings/Documents/...
Code:
Private Sub cmdSendEmail_Click()
    DoCmd.SendObject acSendNoObject, , , cboEmail.Value, , , "Commission Request", "A new commission request has been submitted."
End Sub
How can I do it??
Thanks
 
I do not believe this is possible with any native Access functionality. You may be able to do this with some kind of API calls, etc. but it could get really complicated really fast if you've never done API stuff before... (I have only dabbled in it a little - Sorry)
 
Thanks for the info

:) Marco
 
re:

Hi,
this is one of many limitations Sendobject() has. It can only send internal db objects as attachments and only one at a time.
If you want to send external files then you need to use automation code to automate Outlook (if that is your email client). A good sample can be found here. As you might recognize you do NOT need any API calls for this.
HTH
Good luck
 
Thanks but looks quite complicate for me as a starter :( but will try to get to it!
 
re:

It is really not that bad...just follow the instructions step by step. If you get stuck anywhere let us know and we can try to help you further.
HTH
Good luck
 

Users who are viewing this thread

Back
Top Bottom