Help please - trying to email a report as a RTF but it comes up as .tmp?

CazB

Registered User.
Local time
Today, 23:54
Joined
Jul 17, 2013
Messages
309
Hoping someone can help me....

Using Access 2007 and Lotus Notes 8.5

I've got some code to output a report to email as an attachment: it looks like this

DoCmd.SendObject acSendReport, "rep09emailnotification", acFormatRTF, "(Recipients)", , , "email subject", "email body text", 0

For MOST of the people who use the database, this works fine, and they send the email with the RTF attachment which all the recipients can open - but for some users, it generates a .tmp file which if you 'Open' it is just a load of gobbledegook, but it you 'View' it looks ok - but is truncating the report. :banghead:

Anyone got any ideas what could be causing Access 2007 to create .tmp files rather than .rtf?

TIA
Caz
 
Don't shout at me if I'm wrong here but I think your email body text should have the file type as part of the text "email body text.rtf"
 
Thanks for the reply - but I'm not sure where that would go? My 'actual wording' currently is:

Code:
DoCmd.SendObject acSendReport, "rep09emailnotification", acFormatRTF, "Joe Bloggs; Fred Smith; Bill Brown", , , "Notification of a new Tender", "A new tender has just been added to the Company Tenders database - please see attached file for details", 0

[Edit] Ok, looked into this a bit further... and it seems to be mainly the users who are using Windows 7 who have the problem. My PC was upgraded from NT last week to 7.... and I'm now creating .tmp files as well!! :banghead: Really starting to hack me off, lol...
 
Last edited:
The issue gets deeper - it doesn't matter WHAT format I choose, I get a .tmp file attachment (tried removing the part of the code that specified the file type, so it would prompt for it instead... select ANY of the available formats, I get .tmp)
 
Been playing around with this and now thought maybe the way forward is to to export the report first (to a shared drive) and then see if I can send an email and collect the attachment from the shared drive... The only problem is I'm using Lotus Notes and all the help I can find on sending emails from Access talks about using Outlook! Does anyone have any code I can 'borrow' for sending an email via Notes, and attaching a doc?
 
I think I may have just found a solution!
Basically I managed to find some code for sending email from Access using Lotus Notes, and I've adapted it to suit what I needed to do

My function now creates a report as RTF and drops it onto a shared drive, then generates the email and attaches the saved RTF... sends it, then deletes the RTF from my shared drive !

It works on my PC... just rolling it out to the other users now to make sure it's ok for them too
 

Users who are viewing this thread

Back
Top Bottom