- Joined
- May 2, 2012
- Messages
- 1
- Reaction score
- 0
I'm using a SendObject command to send a table as an attachment. I know when sending a report you can code to change the caption before sending the object. Is there a similar trick for tables since they don't have a caption in their properties.
I want to rename the attachment using one of the form fields I use for the subject (Forms!f_24_200_0100!ABNumber).
Below is my code:
Dim stSubject As String
stSubject = Forms!f_24_200_0100!ABNumber & " - PreOnboarding - " & Forms!f_24_200_0100!NDX & " - " & Forms!f_24_200_0100!Field_SubmittedBy
DoCmd.SendObject acTable, "t_24_000_2000", "Excel97-Excel2003Workbook(*.xls)", "(e-mail address removed)", "", "", stSubject, "", False, ""
Any help is appreciated!!! JWS
I want to rename the attachment using one of the form fields I use for the subject (Forms!f_24_200_0100!ABNumber).
Below is my code:
Dim stSubject As String
stSubject = Forms!f_24_200_0100!ABNumber & " - PreOnboarding - " & Forms!f_24_200_0100!NDX & " - " & Forms!f_24_200_0100!Field_SubmittedBy
DoCmd.SendObject acTable, "t_24_000_2000", "Excel97-Excel2003Workbook(*.xls)", "(e-mail address removed)", "", "", stSubject, "", False, ""
Any help is appreciated!!! JWS