Send email attachment (1 Viewer)

mtagliaferri

Registered User.
Local time
Today, 23:17
Joined
Jul 16, 2006
Messages
519
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
 

KenHigg

Registered User
Local time
Today, 18:17
Joined
Jun 9, 2004
Messages
13,327
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)
 

mtagliaferri

Registered User.
Local time
Today, 23:17
Joined
Jul 16, 2006
Messages
519
Thanks for the info

:) Marco
 

freakazeud

AWF VIP
Local time
Today, 19:17
Joined
Sep 10, 2005
Messages
221
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
 

mtagliaferri

Registered User.
Local time
Today, 23:17
Joined
Jul 16, 2006
Messages
519
Thanks but looks quite complicate for me as a starter :( but will try to get to it!
 

freakazeud

AWF VIP
Local time
Today, 19:17
Joined
Sep 10, 2005
Messages
221
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

Top Bottom