Go Back   Access World Forums > Microsoft Access Discussion > General

Thread Tools Rate Thread Display Modes
Old 11-09-2018, 08:29 PM   #1
Newly Registered User
Join Date: Apr 2017
Posts: 100
Thanks: 19
Thanked 0 Times in 0 Posts
rainbows is on a distinguished road
CC on email

hi ,
I have many reports that need to be CC to many people
I have put this in my embedded macro

=DLookUp("[E-mail Address]","Contacts","[ID]=" & Nz([Assigned To],0))
is it possible that I can put a code against each contact for each report
and just call up that code in the embeded macro ?



rainbows is offline   Reply With Quote
Old 11-09-2018, 11:49 PM   #2
Newly Registered User
Join Date: Apr 2015
Location: KY,USA
Posts: 3,288
Thanks: 0
Thanked 721 Times in 706 Posts
Ranman256 will become famous soon enough Ranman256 will become famous soon enough
Re: CC on email

cycle thru the email list, collect the names, then put list in the .TO property:

in a form is a listbox
the list is a query of the names to send to
this cycles thru the list, collects the names, then sends the report
text boxes hold the report name, email body, and subject

sub btnSend_click()
dim vTo
dim i as integer
dim sToList as string

for i = 0 to lstBox.listcount -1
    vTo = lstBox.itemdata(i)    'get next email in listbox
    lstBox = vTo		'set the listbox to this item

    sToList = sToList & ";" & vTo    

   docmd.SendObject acSendReport ,txtReport,acFormatPDF, sToList,,,txtSubj,txtBody

end sub
Ranman256 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] VBA Code on Subform to Lookup Email field on table and launch email skoolz Queries 3 07-07-2015 05:51 AM
insert HtML file in to body of email (inside loop email) GaryPanic Modules & VBA 9 05-06-2015 12:56 AM
Query records by me!date then email results in body of email on button click TWIRCH75 Modules & VBA 3 02-27-2014 09:10 AM
Send report to email & insert email address off current form MichaelWaimauku Forms 17 12-11-2012 06:32 PM
Email from Access 2010 runtime / Server 2008 without an email client Cloyce Modules & VBA 0 05-15-2012 10:08 AM

All times are GMT -8. The time now is 01:24 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World