Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EMail Multiple Reports on one E-Mail

Status
Not open for further replies.

BanditWk

Programmer
May 24, 2002
170
US
I've become familiar with the SendObjects command to send an e-mail (which works perfectly). I created a function which I call and my line looks like:

SendEmail ("Checklist", "rlmbandit2001@yahoo.com", "", "", "", "")

which is formatted:

SendEmail(Rpt As String, TOAddresses As String, CCAddresses As String, BCAddresses As String, EMailSubject As String, EMailBody As String)

Now, what I would reallY LIKE to happen is to find out how to send multiple Reports to one e-mail address using the SendObjects command.

Anyone have an idea?

Thanks in Advance...

Roy McCafferty
aka BanditWk

Las Vegas, NV

"I do this because I know I can - no need to send gifts - just send me a smile to show me that I've helped." ~ seen on a cardboard sign held by Roy McCafferty on a corner in Las Vegas
 
Hiya,

I haven't done this from within Access, but it seems that you have at least sent to one email add.

I understand that you want your function to be 'more' generic in order to send multiple reports on demand, or are you saying that you now wish to use the 'SendObjects' command - period?

What is your ultimate goal?

Regards,

Darrylle

"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Banditwk: I wish I had a code snippet to offer--this is definitely a needed functionality.

Here's what I'd do to approach the problem:

It's easy enough to send report objects to a file.

It's relatively with the FileSystemObject (ScriptingRuntime code library) to create folders on the fly.

You could offer a multiselect list box and for each selected item send the .snp formatted file to a new temp folder. Then automate Outlook, start a new email and iterate through the temp folder and add each file in the folder as an attachment.

Interactively you could have users save their reports in a folder and then just grab them as attachments in a new mail.
Programmatically no other approach comes to mind (although posting a bad idea is usually sufficient to provoke a better one...). This will be a lot of work. Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
I was struggling 2 weeks back with a same and infact a more complex issue(I solved it). I did something similar to Quehay's suggestion. My prob was to send to different people different sets of reports (The details are stored in a table).

But I don't want to confuse you with that.

There is an article in microsoft site explaining how to send multiple attachments. It is worth reading that as that was the basis of my code.
If you further need any help comeback. All the best.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top