Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embed 2 queries in email body

Status
Not open for further replies.

air1access

Technical User
Jan 27, 2008
123
US
I am messing with some code.. Sample posted below...
I need to embed 2 queries in the body of the email message. I can get 1 query embedded, but I can't get 2...!!

Any suggestions or examples...???
Thanks in advance..!!
air1access

DoCmd.OutputTo acOutputQuery, "Required Materials", acFormatHTML, "D:\UPSDATA\SMP\ReqdMaterials.htm"
Set fs = CreateObject("Scripting.FileSystemObject")
Set J = fs.OpenTextFile("D:\UPSDATA\SMP\ReqdMaterials.htm", ForReading)
MRTFBody = J.ReadAll
J.Close

With MyItem
.BodyFormat = olFormatHTML
.To = "Component EO Group"
.Subject = "Fleet EO - Notification"
.HTMLBody = MRTFBody
.Display
End With
 
Hallo,

Not sure about specifics of this language, but can't you create an MRTFBody2 with the text you want in the same way you create the first one and then replace:
.HTMLBody = MRTFBody
with
.HTMLBody = MRTFBody & MRTFBody2

If .HTMLBody includes a </body> you might have to get rid of it?
Just guessing really...

- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top