By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,759 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,759 IT Pros & Developers. It's quick & easy.

Sending email with atachments in Access 2003 (vb)

P: n/a
Hello all!

A few years ago I created a form with button which let me send an email
with an attachment. It was created in Access 97. Now I would like to
move this application into Access 2003. But when I did it, sending email
code doesn`t work. Can you be so kind and give me the code how to send
email with and without attachment in vb in Access 2003??
Thank you in advance
Marcin

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Post your code. Are there any error messages? It may be something ver
simple that is causing the problem.

Nov 13 '05 #2

P: n/a
Marcin wrote:
Hello all!

A few years ago I created a form with button which let me send an email
with an attachment. It was created in Access 97. Now I would like to
move this application into Access 2003. But when I did it, sending email
code doesn`t work. Can you be so kind and give me the code how to send
email with and without attachment in vb in Access 2003??


If you are using anything other than Outlook as your email client you
may be experiencing problems as a result. For example, I use Netscape
7.x. When the sendobject method is used (which was also tempermental in
A97, though not like it is in A2003) in A2003 and the email client is
Netscape 7.x, the "to" addresses are not transmitted to the email. So I
too found that A2003 did not send anything. If you set your editmessage
argument to true, you will see the email generated without the addresses.

I wouldn't know what to do if you need to do large amounts of emailling,
but in my recent app where there was a small number of emails setn, I
developed an email procedure which opened a form with all the subject,
to, body arguments. A send button also copied the to addresses to the
clipboard (I used an API proceudre to do this) and involed the
sendobject action with editmessage set to true. It is then just a
matter of pasting the address(es) in the 'to' field and sending.

But as I said, for mass emailling - I don't know.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #3

P: n/a


Hello again!

Thanks for your posts. I use Outlook 2003 and also 2000 and Access 2003.
Could you paste me the example how to send emails with and without
attachments?

Thank you in advance
Marcin from Poland.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #4

P: n/a


I will paste the error and the code on Monday, because now I am on
holiday.

Sorry for inconviences
Marcin

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #5

P: n/a
Please post the code you used before

Nov 13 '05 #6

P: n/a
read up on SendObject. But that only works with objects inside your
database. Otherwise, look into automating your email application,
either by using MAPI or automation.

Nov 13 '05 #7

P: n/a
pi********@hotmail.com wrote in
news:11**********************@o13g2000cwo.googlegr oups.com:
read up on SendObject.


SendObject can't do attachments.

However, to get around that, I let the user browse to the attachment
before creating the email message, then copy the attachment path to
the clipboard, so the user can then initiate their email client's
ADD ATTACHMENT function and simple Ctrl-V the path into the
resulting File Open dialog.

I would never tie my clients to Microsoft email clients, which are
the worst email clients available anywhere.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.