The following code works fine except when the email pops up to the user and the user closes the email without sending. I get the message "Run time error 2501; The sendobject action was cancelled.
DoCmd.OutputTo acOutputReport, "rptQuotePrintedNew", "PDFFormat(*.pdf)", "http://team.enps.com/sites/LSLogistics/Spare%20Parts%20Kits/Quotes/Liebert Services Kit-Parts Quote - " & Forms!frmQuoteView!QUOTE_ID & ".pdf", False, "", 0, acExportQualityPrint
DoCmd.SelectObject acReport, "rptQuotePrintedNew", False
DoCmd.SendObject acReport, "rptQuotePrintedNew", "PDFFormat(*.pdf)", Forms!frmQuoteView![E-MAIL], "", "jeff.bourn@emerson.com", "Liebert Services Kit-Parts Quote - " & Forms!frmQuoteView!QUOTE_ID, "Attached is a quote for parts or parts kit. Please review and send the purchase order when the quote is accepted.", True, ""
Forms!frmQuoteView!PRINTDT = Now()
Forms!frmQuoteView!STATUS_ID = 5
Forms!frmQuoteView!FILELINK = "http://team.enps.com/sites/LSLogistics/Spare%20Parts%20Kits/Quotes/Liebert%20Services%20Kit-Parts%20Quote%20-%20" & Forms!frmQuoteView!QUOTE_ID & ".pdf"
DoCmd.Close acReport, "rptQuotePrintedNew"
Any help would be appreciated.
DoCmd.OutputTo acOutputReport, "rptQuotePrintedNew", "PDFFormat(*.pdf)", "http://team.enps.com/sites/LSLogistics/Spare%20Parts%20Kits/Quotes/Liebert Services Kit-Parts Quote - " & Forms!frmQuoteView!QUOTE_ID & ".pdf", False, "", 0, acExportQualityPrint
DoCmd.SelectObject acReport, "rptQuotePrintedNew", False
DoCmd.SendObject acReport, "rptQuotePrintedNew", "PDFFormat(*.pdf)", Forms!frmQuoteView![E-MAIL], "", "jeff.bourn@emerson.com", "Liebert Services Kit-Parts Quote - " & Forms!frmQuoteView!QUOTE_ID, "Attached is a quote for parts or parts kit. Please review and send the purchase order when the quote is accepted.", True, ""
Forms!frmQuoteView!PRINTDT = Now()
Forms!frmQuoteView!STATUS_ID = 5
Forms!frmQuoteView!FILELINK = "http://team.enps.com/sites/LSLogistics/Spare%20Parts%20Kits/Quotes/Liebert%20Services%20Kit-Parts%20Quote%20-%20" & Forms!frmQuoteView!QUOTE_ID & ".pdf"
DoCmd.Close acReport, "rptQuotePrintedNew"
Any help would be appreciated.