Hi
I currently send a copy of an Invoice report using the following code that all works fine:
Private Sub Command81_Click()
Dim stDocName As String
stDocName = "ReportInvoice"
DoCmd.OpenReport stDocName, acPreview, , "[ID] = " & Me.ID
DoCmd.SendObject acSendReport, "RptInvoice", acFormatPDF, "emailaddress",, , "***Copy of Invoice***", "Copy of invoice sent, attached"
End Sub
The problem is I now want to request a Receipt when read and send the email in silence.
I believe I am unable to do this using Docmd.SendObject so have spent some time looking at other code which utilises code such as:
olitem.ReadReceiptRequested = True
and
olitem.Send
the problem is I do not know what code to use to attach the specific invoice report that I am actually trying to email.
I have found examples of code that will allow me to attach a file from a fixed location example C:\myfolder.pdf
Can anyone help me with code to email the specific report i want to send and send it silent with a read receipt.
Thank you
I currently send a copy of an Invoice report using the following code that all works fine:
Private Sub Command81_Click()
Dim stDocName As String
stDocName = "ReportInvoice"
DoCmd.OpenReport stDocName, acPreview, , "[ID] = " & Me.ID
DoCmd.SendObject acSendReport, "RptInvoice", acFormatPDF, "emailaddress",, , "***Copy of Invoice***", "Copy of invoice sent, attached"
End Sub
The problem is I now want to request a Receipt when read and send the email in silence.
I believe I am unable to do this using Docmd.SendObject so have spent some time looking at other code which utilises code such as:
olitem.ReadReceiptRequested = True
and
olitem.Send
the problem is I do not know what code to use to attach the specific invoice report that I am actually trying to email.
I have found examples of code that will allow me to attach a file from a fixed location example C:\myfolder.pdf
Can anyone help me with code to email the specific report i want to send and send it silent with a read receipt.
Thank you