I am currrently trying to attach a report called (rptQuotation) and fill in email address, subject, etc. to Microsoft outlook by using the DoCmd.SendObject.
The following is what I am using
DoCmd.SendObject acReport, "rptQuotation", acFormatXLS, "email@anywhere.com", , , "Quote", _
"Here is the quote you asked for", True
Everything works as expected. The name of the report that is attached to my email is called rptQuotation - as expected. I would like to make name of the emailed document dynamic per quote..to something a little more intelligent, as I send multiple quotes to the same customer very often...and I don't want the customer to have to manage the names. The caption property seems to be what drives the name of the report. I tried to set the caption in on Open Event, but this does not seem to have any affect (like it happens too late). I also tried to set the caption property to Me![QuoteNumber]. When I do this, the name of the attached document is Me![QuoteNumber].xls
I realize that I can use the DoCmd.OutputTo command and force a name in, but this requires the user to manually create the email. Any suggestions would be appreciated.
Thanks,
Ken
The following is what I am using
DoCmd.SendObject acReport, "rptQuotation", acFormatXLS, "email@anywhere.com", , , "Quote", _
"Here is the quote you asked for", True
Everything works as expected. The name of the report that is attached to my email is called rptQuotation - as expected. I would like to make name of the emailed document dynamic per quote..to something a little more intelligent, as I send multiple quotes to the same customer very often...and I don't want the customer to have to manage the names. The caption property seems to be what drives the name of the report. I tried to set the caption in on Open Event, but this does not seem to have any affect (like it happens too late). I also tried to set the caption property to Me![QuoteNumber]. When I do this, the name of the attached document is Me![QuoteNumber].xls
I realize that I can use the DoCmd.OutputTo command and force a name in, but this requires the user to manually create the email. Any suggestions would be appreciated.
Thanks,
Ken