A
Allen Thompson
I have some code I have adapted from one of the posts. I am trying to take a
record from a table which includes email address, project number, project
name, etc.. I have figured out how to fill in the TO: Line and part of the
message.
I need to include information from the record in the table in the email.
CODE:
Private Sub cmdEmail_Click()
On Error GoTo Err_cmdEmail_Click
Dim strDocName As String
Dim strEmail As String
Dim strMailSubject As String
Dim strMsg As String
strDocName = Me.lstRpt
strEmail = Me.txtSelected & vbNullString
strMailSubject = "Segment Research & Analytics"
strMsg = Me.txtMsg & vbNullString & vbCrLf & _
vbNullString & vbCrLf & _
vbCrLf & "Recently the research and Analytics group completed a project
for you. The project ID & Name are below:" & _
XXXXXXXXXXXXXXXXXXXXXXXX
vbNullString & vbCrLf & _
vbNullString & vbCrLf & _
vbCrLf & "Allen J Thompson" & _
vbCrLf & "Mail To: Allen_J_Thompson@***.Com" & _
vbCrLf & "Phone: (***)*******"
DoCmd.SendObject objecttype:=acSendNoObject, _
ObjectName:=strDocName, outputformat:=acFormatHTML, _
To:=strEmail, Subject:=strMailSubject, MessageText:=strMsg
This is what I want it to look like - all the text is static except for the
information XXXXXX which would come from the table:
Recently the Segment Research & Analytics group completed a project for you.
The project ID & Name are below:
"3258" "PR & CD1 Messaging Drivers Study"
If you could either click on the link below or copy and paste the link into
a browser window a short survey will be displayed. This survey is designed
for us to better assist you with your research and analytic needs. If at all
possible please complete the survey by Friday 06/25/04.
http://********08.ma.***.com/forms/html/copy_of_copy_of_bus_partner_survey2.htm
Thank you in advance for your participation.
Any help would be much appreciated.
Thank you - Allen
record from a table which includes email address, project number, project
name, etc.. I have figured out how to fill in the TO: Line and part of the
message.
I need to include information from the record in the table in the email.
CODE:
Private Sub cmdEmail_Click()
On Error GoTo Err_cmdEmail_Click
Dim strDocName As String
Dim strEmail As String
Dim strMailSubject As String
Dim strMsg As String
strDocName = Me.lstRpt
strEmail = Me.txtSelected & vbNullString
strMailSubject = "Segment Research & Analytics"
strMsg = Me.txtMsg & vbNullString & vbCrLf & _
vbNullString & vbCrLf & _
vbCrLf & "Recently the research and Analytics group completed a project
for you. The project ID & Name are below:" & _
XXXXXXXXXXXXXXXXXXXXXXXX
vbNullString & vbCrLf & _
vbNullString & vbCrLf & _
vbCrLf & "Allen J Thompson" & _
vbCrLf & "Mail To: Allen_J_Thompson@***.Com" & _
vbCrLf & "Phone: (***)*******"
DoCmd.SendObject objecttype:=acSendNoObject, _
ObjectName:=strDocName, outputformat:=acFormatHTML, _
To:=strEmail, Subject:=strMailSubject, MessageText:=strMsg
This is what I want it to look like - all the text is static except for the
information XXXXXX which would come from the table:
Recently the Segment Research & Analytics group completed a project for you.
The project ID & Name are below:
"3258" "PR & CD1 Messaging Drivers Study"
If you could either click on the link below or copy and paste the link into
a browser window a short survey will be displayed. This survey is designed
for us to better assist you with your research and analytic needs. If at all
possible please complete the survey by Friday 06/25/04.
http://********08.ma.***.com/forms/html/copy_of_copy_of_bus_partner_survey2.htm
Thank you in advance for your participation.
Any help would be much appreciated.
Thank you - Allen