Emailing information to be updated, but in a spreadsheet view, (1 Viewer)

Mtoney76

New member
Local time
Today, 03:21
Joined
Jul 26, 2016
Messages
9
Howdy! I'm attempting to create code which would act similar to the Mail Wizard (Grouping multiple records into 1 email) But instead being viewed in a Excel Spreadsheet or just table format. I've seen multiple posts about sending an entire table to 1 email address, but was wondering if anyone knew a way to filter by an Email column and then send all of those records in that table view to the value in that field. thank you all in advance, Y'all are life savers.

Edit: Here is my Current Code. this is very much so WIP.

Sub EMAILEMAIL()


Dim stDocName As String
Dim stToName As String
Dim stCCName As String
Dim stBCCName As String
Dim stSubject As String
Dim stMessage As String
Foreach [MMMMMM] in [MMMMMM]
stDocName = "ServersAllActive_US_ENGRBUILD4months"
stToName = ServersAllActive_US_ENGRBUILD4months.[MMMMMM]
stCCName = ServersAllActive_US_ENGRBUILD4months.[MMMMMM]
stBCCName = ServersAllActive_US_ENGRBUILD4months.[MMMMMM]
stSubject = "Howdy"
stMessage = "Howdy"


DoCmd.SendObject acSendTable, stDocName, acFormatXLS, stToName, stCCName, stBCCName, stSubject, stMessage
End Sub

the [MMMMMM] is a test field with a test email address.
 
Last edited:

Minty

AWF VIP
Local time
Today, 09:21
Joined
Jul 26, 2013
Messages
10,369
Why not just send an attached spreadsheet with the correct filtered data in it for each mmmmm ?
You seem to be possibly re-inventing the wheel - a process something like;
Code:
Create your list of email addresses
For each Email_address
     Create temp spreadsheet for that email address
     create email for that email address
     attach the Spreadsheet
     send the email
     delete the spreadsheet
Next Email_address
 
Last edited:

Users who are viewing this thread

Top Bottom