SendObject not Working

G

Guest

Every time the SendObject command is executed, the resulting email contains
an Excel attachment. The text section of the email should contain the fields
defined in my report. Does anyone know why this is happening? Help!!!!!!!
 
G

Guest

Here's the code, user supplies a project start date, combo62 equals a
department name, and combo64 equals a project id number.

Private Sub Combo62_AfterUpdate()
Me.Combo64 = Null
Me.Combo64.Requery
Me.Combo64 = Me.Combo64.ItemData(0)
End Sub

Private Sub Combo64_AfterUpdate()
With Forms!FRMTEST1
..SetFocus
..Requery
End With

End Sub

Private Sub Exit_Click()
On Error GoTo Err_Exit_Click

DoCmd.Close
DoCmd.OpenForm "Switchboard", acNormal

Exit_Exit_Click:
Exit Sub

Err_Exit_Click:
MsgBox Err.Description
Resume Exit_Exit_Click
End Sub

Private Sub Mail_Project_Notice_Click()
On Error GoTo Err_Mail_Report_Click
Dim stDocName As String
Dim stDocName1 As String

stDocName = "qryt2"
stDocName1 = "rptProject_Update_Email"


DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SendObject acReport, stDocName1, "HTML(*.html)", , , , "Project Update
Notification"

DoCmd.Close acQuery, "qryt2"

Exit_Mail_Report_Click:
Exit Sub

Err_Mail_Report_Click:
MsgBox Err.Description
Resume Exit_Mail_Report_Click

End Sub
 
G

Guest

I posted a request for help on this same issue in "Reports." I see the same
problem in this forum twice just today so here's my two cents

Access 2003

I am sending a report with a formatted Email message in SNP format using a
form. From time to time the report will show up on the email attached as an
Excel Spreadsheet with a system generated file name (and extension XLS). Of
course when you open the file, it appears as gibberish.

The command line in my code looks like this:

DoCmd.SendObject acSendReport, stDocName, acFormatSNP, msgTo, msgCC, msgBCC,
msgSub, msgBod

I've been able to fix the problem by changing the Caption in Report
Properties. This will correct the problem for awhile.

As this seems to be occurring more often lately I'd like to know if this is
documented anywhere and if there is a permanent fix I can apply.

Thanks!

Bill
 

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