I have been using sendobject code for many years to send invoice copies through my email client which until last Friday was Windows Live Mail.
The issue I am having is that I now want Outlook to send my reports.
I have changed the default email app, but WLM is still opening when I run that code through a button.
Does the MS office library need to be referenced or is there something else that I am missing?
The issue I am having is that I now want Outlook to send my reports.
I have changed the default email app, but WLM is still opening when I run that code through a button.
Does the MS office library need to be referenced or is there something else that I am missing?
Code:
DoCmd.OpenReport sExistingReportName, acViewPreview, , , acHidden
Reports(sExistingReportName).Caption = sAttachmentName 'by changing the report caption
'you effectively change the name
'used for the attachment in the
'.SendObject method
DoCmd.SendObject acSendReport, sExistingReportName, acFormatPDF, notice, , "REMOVED", "REMOVED - Your Invoice copy :" & InvoiceNumber, "Please find your Invoice copy attached."
DoCmd.Close acReport, sExistingReportName