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

2 Reports on 1 Email message or fix subreport problem 2

Status
Not open for further replies.

tledwards

Programmer
Feb 4, 2003
86
US
Is there a method to attach two reports to 1 email. I want to send a report which tasks a person to perform a number of functions. Then attached a second report to the same with my email and other information for him to tell me his plan for performing the actions.

I was doing this on one report with the last page used for his reply. Sending in rtf format worked fine until I had to change one of the fields on the continuous subreport to a memo field to hold all the information. Now when I use rtf to send the file I lose the last 50 - 100 characters. It doesn't matter if the file is 500 or 1000 characters long the last part is misssing. All the data is there if sent in the txt or snapshot form. But txt reports is all jumbled up and the person cannot change the snapshop version. I've tried many things including adding extra spaces and the end of the message. This worked on some fields but not others. I tried useing the GetChunk command but could not get it to work.
Thanks for any help you can give me.
 
I do not know the problem with the report / sub report, but if you can run each report differently, then here is what I do.

I use a macro to export all the reports, with different names, and then use vba to generate an e-mail, attaching all the different things I need.

Interestingly, it was with a projec task system that I was building when I wrote the code.

'-----
Set ObjOutlook = CreateObject("Outlook.Application")
Set ObjEmail = ObjOutlook.CreateItem(olMailItem)

With ObjEmail
.To = M_Address
.ReadReceiptRequested = False
.body = "The attached outlines Projects Steps assigned for completion." & Chr(10) & Chr(13)
.Subject = "Projects Step Assignments"
Set objOutlookAttach = .Attachments.Add("C:\Project_Assignment.RTF")
.Send
End With

You can do as manny attachments as required.

ChaZ

"When religion and politics ride in the same cart...the whirlwind follows."
Frank Herbert
 
ChaZ,
Thanks for your code. It was very helpful. I was able to attached the two attachments as you said.
Actually three other people will be sending out these reports and they want to add their own notes and have to add the To e-mail address before it is sent. I tried several things but could not get Outlook to open so the could add their notes and the To address. So I set it up to e-mail the report to them and the can add their notes and forward to who ever they have to.
The DoCmd.SendObject method opens email if do not give a To address.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top