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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Snapshot report and fill in email address automatically

Status
Not open for further replies.

Computethis

IS-IT--Management
Feb 5, 2001
28
0
0
US
I have been using a macro to prep a snapshot report from a form that does all the work of sorting and querying the data needed... I setup the subject and the message in the macro and output it to a snapshot email document..

I would like to create a field in my table where I type in the person's email address and the macro would pull from that table/field and fill that in the email...

Can that be done fairly simple ???

Thanks!
Mitch
 
Instead of using a macro to send the report, use a module and code the information using the Sendobject method.

In the module you can code to get the email address and store it in string variable, then use that string variable in the Sendobject code.

get your email address info into strEmailAddress then send the email using this code:

docmd.sendobject acsendreport, "YourReportName","Snapshot Format", strEmailAddress,,,"Subject Stuff","Message Stuff", False
 
Since I have never created a Module is there a way to do this via Macro ??
 
In the Macro, in the Action, select "SendObject" the following need to be completed:

Object Type: Report
Object Name: NameOfReport
Output Format: Snapshot Format
To: FirstEMail@address.com
CC:
Bcc:
Subject: Subject of EMail
Message Text: A brief note to go in the e-mail
Edit Message: No (Selecting yes will pop-up for modification)
Template File:

That's all you need! Have fun!

HTH Roy McCafferty
aka BanditWk

Las Vegas, NV
roy@cccamerica.org
RLMBandit@aol.com (private)

"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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top