I have been able to write a line of code in a form that is called "SafetyLogF" that generates an email message in either Outlook or Eudora and attaches an HTLM document as the object.
However, the user must manually enter the recipient's email address because I am not sophisticated enough to understand what needs to be done to take the email address and place it in the email document automically. I know this can be done, I have just not been able to see an example that clicks for me. So I am asking for a little help.
The command button that will launch this automatic email notification is in this form called "SafetyLogF". The "SafetyLogF" contains a field called "email". The "email" field is not displayed but contains the recipient's email address that should go in the "To" line of the mail message.
The code that I am trying to write is this:
DoCmd.SendObject acSendReport, "Safety Item Assignment", acFormatHTML, SafetyLogF!, , , "Safety Log Item", "You have been assigned a Safety Log Item. The attached document is a description of the item. Please open the BNSF Safety Log and browse through your assigned issues.", True
I think that I have to define the variable "SafetyLogF", but am not sure how to do this so that everything works.
Can someone help me here?
However, the user must manually enter the recipient's email address because I am not sophisticated enough to understand what needs to be done to take the email address and place it in the email document automically. I know this can be done, I have just not been able to see an example that clicks for me. So I am asking for a little help.
The command button that will launch this automatic email notification is in this form called "SafetyLogF". The "SafetyLogF" contains a field called "email". The "email" field is not displayed but contains the recipient's email address that should go in the "To" line of the mail message.
The code that I am trying to write is this:
DoCmd.SendObject acSendReport, "Safety Item Assignment", acFormatHTML, SafetyLogF!, , , "Safety Log Item", "You have been assigned a Safety Log Item. The attached document is a description of the item. Please open the BNSF Safety Log and browse through your assigned issues.", True
I think that I have to define the variable "SafetyLogF", but am not sure how to do this so that everything works.
Can someone help me here?