Hi Jesse,
Try:
.Body = " APPLICANT_NAME:" & rs!Applicant_Name & _
" 2nd line" & _
" 3rd line" & _
" 4th line"
Regards,
Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<
http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <
http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."
This posting is provided "AS IS" with no warranties, and confers no rights
--------------------
| Content-Class: urn:content-classes:message
| From: "Jessie" <
[email protected]>
| Sender: "Jessie" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| Subject: RE: Email Report as Body
| Date: Tue, 27 Jul 2004 16:06:51 -0700
| Lines: 176
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| thread-index: AcR0LmbQycHl1vmASxKP+jl9WHXVkg==
| Newsgroups: microsoft.public.access.formscoding
| Path: cpmsftngxa10.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.access.formscoding:240216
| NNTP-Posting-Host: tk2msftngxa14.phx.gbl 10.40.1.166
| X-Tomcat-NG: microsoft.public.access.formscoding
|
| Hi Eric-
| Thanks for the response. That doc really helped, but I am
| trying to figure out how to continue to the next line.
| Here is what I have and it works, but I need to have a
| total of 25 fields represented. How do I contiue the Body=
| line of code to the next line without ending the .Body=
| statement?
|
| Private Sub Command0_Click()
| Dim rs As DAO.Recordset
| Dim db As DAO.Database
| Dim olookApp As Outlook.Application
| Dim olookMsg As Outlook.MailItem
| Dim olookRecipient As Outlook.Recipient
| Dim olookAttach As Outlook.Attachment
| Set db = CurrentDb
| Set rs = db.OpenRecordset("SELECT * FROM RSD_TD;")
| If rs.RecordCount > 0 Then
| rs.MoveFirst
| Do Until rs.EOF
| ' create the Outlook session.
| Set olookApp = CreateObject("Outlook.Application")
|
| ' create the message.
| Set olookMsg = olookApp.CreateItem(olMailItem)
|
| With olookMsg
| ' add the To recipient(s) to the message.
| Set olookRecipient = .Recipients.Add
| ("(e-mail address removed)")
| olookRecipient.Type = olTo
|
|
| ' set the Subject, Body, and Importance of the
| message.
| .Subject = "Lead"
| .Body = "APPLICANT_NAME:" & rs!Applicant_Name & Chr
| (13) & "APPLICANT_EMAIL:" & rs!APPLICANT_EMAIL & Chr(13)
|
|
|
|
|
|
| .Importance = olImportanceHigh 'High importance
|
|
| ' resolve each Recipient's name
| For Each olookRecipient In .Recipients
| olookRecipient.Resolve
| If Not olookRecipient.Resolve Then
| olookMsg.Display ' display any names that
| can't be resolved
| End If
| Next
| .Send
|
| End With
| Set olookMsg = Nothing
| Set olookApp = Nothing
|
| rs.MoveNext
| Loop
| Set rs = Nothing
| End If
| End Sub
|
| >-----Original Message-----
| >Hi Jessie,
| >
| >Take a look at the Automation help topic for Microsoft
| Outlook
| >
| >
http://support.microsoft.com/default.aspx?scid=KB;EN-
| US;260410
| >
| >You wouldn't use a Report as the template to place in the
| body of the
| >message however you could use the VBA code for something
| like
| >
| > APPLICANT_NAME: [query field applicant's name]
| > APPLICANT_EMAIL: [query field applicant's email
| > CO_APPLICANT_NAME: [query field coapplicant's name]
| > etc...
| >
| >
| >I hope this helps! If you have additional questions on
| this topic, please
| >respond back to this posting.
| >
| >
| >Regards,
| >
| >Eric Butts
| >Microsoft Access Support
| >
[email protected]
| >"Microsoft Security Announcement: Have you installed the
| patch for
| >Microsoft Security Bulletin MS03-026? If not Microsoft
| strongly advises
| >you to review the information at the following link
| regarding Microsoft
| >Security Bulletin MS03-026
| ><
http://www.microsoft.com/security/security_bulletins/ms03
| -026.asp> and/or
| >to visit Windows Update at
| <
http://windowsupdate.microsoft.com/> to install
| >the patch. Running the SCAN program from the Windows
| Update site will help
| >to insure you are current with all security patches, not
| just MS03-026."
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights
| >
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Jessie" <
[email protected]>
| >| Sender: "Jessie" <
[email protected]>
| >| Subject: Email Report as Body
| >| Date: Mon, 26 Jul 2004 13:46:45 -0700
| >| Lines: 26
| >| Message-ID: <
[email protected]>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| Thread-Index: AcRzUanfPj99S0qdTNOR5pHUJkfHTw==
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Newsgroups: microsoft.public.access.formscoding
| >| NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
| >| Path:
| >cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!
| TK2MSFTNGP08.phx.gbl!cpmsftngxa06
| >.phx.gbl
| >| Xref: cpmsftngxa10.phx.gbl
| microsoft.public.access.formscoding:240083
| >| X-Tomcat-NG: microsoft.public.access.formscoding
| >|
| >| Hello,
| >|
| >| Nightly I have a query with 100 records that have to be
| >| emailed with one record per email. The body of the
| email
| >| has to conform to a specific template (see below). I
| built
| >| a report that will meet the criteria of the template,
| but
| >| do not know how to automate the sending of the email.
| In
| >| the body of the email I have to have the Field name and
| >| the data. Here is a portion of what it has to look like:
| >|
| >| APPLICANT_NAME: Richard Nolan Test
| >| APPLICANT_EMAIL: (e-mail address removed)
| >| CO_APPLICANT_NAME: Coapplicant Name
| >| CO_APP_EMAIL: (e-mail address removed)
| >| ADDRESS1: 8190 Avens Circle
| >| ADDRESS2: Address 2
| >| CITY: Colorado Springs
| >| STATE: CO
| >| ZIP: 80920
| >|
| >|
| >| I know this is vague. Any help would be greatly
| >| appreciated.
| >|
| >| Thanks,
| >| Jessie
| >|
| >
| >.
| >
|