Hi,
I have a report (record source 'emailreports' ) that contains a list of employees who need to complete their training. When the admin click on the report button, the admin has to enter the manager's username (the first part of their email address). The 'emailreports' will populate the report with a list of employees who belongs to the manager and document number that each employee needs to complete. Is there a way for me to use this information and put it on the Send email lines?
Example (step by step):
1. Click 'Daily Training Report'
2. Enter Manger username --> admin inputs 'aapple'
3. Word doc opens with the following information:
Employee name username doc number
Amy Adams aadams 1152-125
Amy Adams aadams 1152-135
Bob Sing bsing 1204-145
Bob Sing bsing 1152-135
Code:
With iMsg
Set .Configuration = cdoConfig
.To = obtain from admin input 'from example it would be aapple@123.com
.CC = obtain from report ' from example it would be aadams@123.com, bsing@123.com
.BCC = ""
.From = abc@123.com
.Subject = "Weekly Training Updates"
.TextBody = "Please see the attached document for training updates"
'.Addattachment "C:/" & savename
.Send
End With
Thanks,
teebumble