acFormatRTF creates Excel file

D

drumstruck

Hi,
I have an Access form with a button that runs a report and attempts to email
it. When I run it, it seems to work fine - it creates an attachment
(Incidents.rtf) that I can open with Word.
But when my primary user runs it, they get an Excel attachent (CDB##.xls).
The attachment still has the correct data - which I can see if I detach it as
a .doc.
Why can't I get this to work consistantly. Why would one person get a .xls
attachment? I checked the user's folder options and .rtf is set to open as
Word.
Any help would be greatly appreciated. Here's the VB code:

Private Sub Notify_Click()
On Error GoTo Err_Notify_Click
Dim emailbody As String
' Email Management
emailbody = Health_Service_Descr & " Category = " & Category & ". Incident
report attached."
DoCmd.SendObject acSendReport, "Incidents", acFormatRTF, _
"Sean xxx", _
"Annette xxx", "", _
"New Illness/Injury Incident categorized", _
emailbody, True, ""
Exit_Notify_Click:
Exit Sub
Err_Notify_Click:
MsgBox Err.Description
Resume Exit_Notify_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top