J
jaminblair
I created a DB in Access 2002 that had VBA Private Sub that ran from a Form
Button. This button would open a report based on the Form and use the
SendObject command to also e-mail it to a recipient. The Sub is below.
Private Sub ReprintEmail_Click()
On Error GoTo Err_ReprintEmail_Click
Dim stDocName As String
stDocName = "InvoiceOrderNum"
DoCmd.OpenReport stDocName, acNormal
DoCmd.SendObject acReport, "InvoiceOrderNum",
"SnapshotFormat(*.snp)", "(e-mail address removed)", "", "", "Appliance
Sales Order ID " & Forms!ReviewOrders5![OrderID], "", False, ""
Exit_ReprintEmail_Click:
Exit Sub
Err_ReprintEmail_Click:
MsgBox Err.Description
Resume Exit_ReprintEmail_Click
End Sub
I never had any problems and the code worked great until I recently got a
new PC with Office 2003. I did some modifications on the DB for something
else that did not pertain to this code at all. My co-workers are still using
Access 2002 but I am using Access 2003. When this button is clicked in 2002
it immediately comes up with a parameter box asking for a format which has
not been an issue until I got the new Office 2003. I have changed the
'Format' to all of the following with no luck: "Snapshotformat (*.snp)" ,
"Snapshot Format", "(*.snp)", acformatsnp, and "Snapshot Format (*.snp)". My
co-worker and I think it has something to do with the Object Library
reference. Please help. Thanks, JBB
Button. This button would open a report based on the Form and use the
SendObject command to also e-mail it to a recipient. The Sub is below.
Private Sub ReprintEmail_Click()
On Error GoTo Err_ReprintEmail_Click
Dim stDocName As String
stDocName = "InvoiceOrderNum"
DoCmd.OpenReport stDocName, acNormal
DoCmd.SendObject acReport, "InvoiceOrderNum",
"SnapshotFormat(*.snp)", "(e-mail address removed)", "", "", "Appliance
Sales Order ID " & Forms!ReviewOrders5![OrderID], "", False, ""
Exit_ReprintEmail_Click:
Exit Sub
Err_ReprintEmail_Click:
MsgBox Err.Description
Resume Exit_ReprintEmail_Click
End Sub
I never had any problems and the code worked great until I recently got a
new PC with Office 2003. I did some modifications on the DB for something
else that did not pertain to this code at all. My co-workers are still using
Access 2002 but I am using Access 2003. When this button is clicked in 2002
it immediately comes up with a parameter box asking for a format which has
not been an issue until I got the new Office 2003. I have changed the
'Format' to all of the following with no luck: "Snapshotformat (*.snp)" ,
"Snapshot Format", "(*.snp)", acformatsnp, and "Snapshot Format (*.snp)". My
co-worker and I think it has something to do with the Object Library
reference. Please help. Thanks, JBB