Hi! I am using Access 97 with Lotus Notes R5 as my mail server. I have been trying to automate the attaching of reports in RTF for my clients through the SendObject method.
I have the following code on the onClick event for a button:
Private Sub cmdEmail_Click()
Dim WorkID As String
Dim subject As String
WorkID = Forms!F_Unsched_Work!Work_ID
subject = "Work Order number " & WorkID & " has been generated for your section!"
DoCmd.SendObject acSendReport, "R_Email_WO_Request",acFormatRTF, , , , subject, , , False
End Sub
I would like the report to open in MS Word, but somehow, the report is attached as a .XLS with crazy unformatted data in the first cell. Weird thing is, the code works for some reports and opens them in MS Word, but doesn't for others.
Could somebody please help? Thanks in advance.
Azalea
I have the following code on the onClick event for a button:
Private Sub cmdEmail_Click()
Dim WorkID As String
Dim subject As String
WorkID = Forms!F_Unsched_Work!Work_ID
subject = "Work Order number " & WorkID & " has been generated for your section!"
DoCmd.SendObject acSendReport, "R_Email_WO_Request",acFormatRTF, , , , subject, , , False
End Sub
I would like the report to open in MS Word, but somehow, the report is attached as a .XLS with crazy unformatted data in the first cell. Weird thing is, the code works for some reports and opens them in MS Word, but doesn't for others.
Could somebody please help? Thanks in advance.
Azalea