Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple attachments with docmd.sendobject

379 views
Skip to first unread message

Russ

unread,
Feb 6, 2004, 10:36:05 AM2/6/04
to
Hi all,

I have a simple problem I'm using the docmd.sendobject to send a report as an rtf file attachment to email addresses ... It send the email fine ... But some times it will send Muliple attachments ie 3 rtf's that had quite different data on them.. This is not good.

Does anyone know why ... It;s access 2000 on winxp pro


Thanks in advance Russ

Bruce M. Thompson

unread,
Feb 6, 2004, 4:53:50 PM2/6/04
to

In order to attach multiple documents to an email message using VBA, you will
need to implement some form of automation - the SendObject method only supports
a single filename being passed as an argument. Depending on what email software
is being used, you might be able to use Outlook automation or, if the email
client software is not Outlook or may vary from workstation to workstation, you
may need to use MAPI which is a little more complicated.

See the following page at Tony Toews' web site for some information and links
that might get you started:

Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

--
Bruce M. Thompson, Microsoft Access MVP
bthm...@mvps.org (See the Access FAQ at http://www.mvps.org/access)
>> NO Email Please. Keep all communications
within the newsgroups so that all might benefit.<<


Russ

unread,
Feb 7, 2004, 3:21:05 AM2/7/04
to

Hi Bruce,

Thanks for the reply.. My problem is that 'I am' getting multiple attachments being sent from time to time with different data on them...

What I want is sendobject to only send the one attachment as it should do.

As you can imagine it doing my nut. because it should not screw up like this.


Any ideas why it is doing it?


Thanks in advance Russ

Bruce M. Thompson

unread,
Feb 9, 2004, 12:52:03 PM2/9/04
to

Are you saying that you are getting multiple documents being attached to the
same email message or that some of the messages have a document attached with
different information in it when they should all be the same? With SendObject, I
can only imagine the latter being the case. You must keep in mind that the same
report must be "run" each time you use the SendObject method, so if the data or
any criteria affecting the contents of the report changes during the course of
generating your mailing, the data in the report is apt to change also.

tambrocio

unread,
Feb 7, 2004, 8:51:05 AM2/7/04
to
I do not know the answer to your problem, but I am in dire straits about a small problem with Access 97.

One of the things I am trying to do is to create an e-mail after certain actions have been done.
I need to talk with someone about this. Would you be able to help me?

konveyance

unread,
Aug 27, 2011, 3:29:16 AM8/27/11
to
Russ wrote on 02/06/2004 10:36 ET :
> Hi all
> Thanks in advance Russ
>
He is obviously saying that he has ONE sendObject command in the macro.
and ONE attachment is expected. but MS-ACCESS is attaching multiple version of
the query with varying results in them. and there are no criteria changes.

We are getting the same issue happening where I work.
It started yesterday. There were no changes to the beforehand.
Well, automatic updates is turned on. so obviously this is Microsoft messing
up.
I have ONE SendObject command. One Macro and am expecting ONE attachment.
That's not what I get... and it varies... some macros setup like that get two
attachments, some get more. I expect more than just a run around answer like
that VP gave.
0 new messages