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
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.<<
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
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.
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?