Hello,
I'm using Access 2000 on Windows 2000 and got the following question.
In my database I'm using the following VBA:
DoCmd.SendObject acSendReport, "Sales Report", acFormatRTF, [mailadres]
This script is creating a mail with the report "Sales Report" attached to it. That's working fine. But my question is about the name of the attachment. On default, the name of the attachment is the name of the report that I'm sending. But I would like to have the name of the customer in the name of the attachment. So in case I'm sending a report for Customer A, the name of the attachment should be "Customer A", in case of Customer B, "Customer B" etc. etc. So the name of the attachment should be variable, although I'm always sending the same report ("Sales Report"). In my database I've got the field [customer] available.
Do you know how to solve this?
Thanks in advance for your help!
Regards,
Robert
The Netherlands
I'm using Access 2000 on Windows 2000 and got the following question.
In my database I'm using the following VBA:
DoCmd.SendObject acSendReport, "Sales Report", acFormatRTF, [mailadres]
This script is creating a mail with the report "Sales Report" attached to it. That's working fine. But my question is about the name of the attachment. On default, the name of the attachment is the name of the report that I'm sending. But I would like to have the name of the customer in the name of the attachment. So in case I'm sending a report for Customer A, the name of the attachment should be "Customer A", in case of Customer B, "Customer B" etc. etc. So the name of the attachment should be variable, although I'm always sending the same report ("Sales Report"). In my database I've got the field [customer] available.
Do you know how to solve this?
Thanks in advance for your help!
Regards,
Robert
The Netherlands