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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email problem 1

Status
Not open for further replies.

espinosalex

Programmer
Jul 27, 2001
6
0
0
PA
I am working in MS Access 2000. I want to be able to put a report in the body of an email, not attach it. Anyone have any ideas?
 
You can build the report in the body of the email but this is just plain text type stuff (no column headings, no formating, etc). There is no way I know of to actual past a picture of a report into an email.

Hope this helps.

OnTheFly
 
If you are worried about the size of the report or is it a user preference or do you want to be able to e-mail directly from your database?
 
I want to send my report to e-mail directly from my database..in the body..not attach it..
 
I would also like to be able to do this. Every time I have tried it appears as if you are limited in number of characters. The only way I have been able to get an entire report is by attaching it.

I would love if some one has an answer as to how to insert an entire report inot the body of the e-mail.
 
Hi
Something like this may do as a work around. The idea is to save the report as HTML or RTF, then read it in:
Code:
Sub RTFBody()
Const ForReading = 1, ForWriting = 2, ForAppending = 3

Dim fs, f
Dim RTFBody, strTo
Dim MyApp As New outlook.Application
Dim MyItem As outlook.MailItem

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile("C:\\Report.rtf", ForReading)
RTFBody = f.readall
f.Close

Set MyItem = MyApp.CreateItem(olMailItem)
With MyItem
   .To = "me@hotmail.com"
   .Subject = "txtSubjectLine"
   .Body = RTFBody
End With
MyItem.Display
End Sub
 
Hi Remou

I've just been 'googling around' to try to discover how to create an RTF body for a 700-recipient email (plus personalised Word & Excel attachments) from an Access database, thinking in terms of creating the body programmatically using Outlook Redemption (but not yet finding out how...) and I stumbled across your posting which seems to answer my needs.

And on my first visit to Tek-Tips!

 
Welcome.
Best forum going, wait til you see the experts in action! :-D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top