lorenambrose
Active Member
- Joined
- Sep 17, 2008
- Messages
- 265
OK here goes
My Engineering Request database needs an email feature
I have a seperate MACRO for each departments email address.
DEPARTMENT----------------ASSOCIATED EMAIL ADDRESS
Production -------- ------QAProduction@blah.blah
Engineering-------- ------QAEngineering@blah.blah
Materials---------- -------QAMaterials@blah.blah
Quality Assurance--- ----Quality Department@blah.blah
You get the idea
This is typical code for executing the email macro:
Private Sub Command23_Click()
If Me.Email = "Sent" Then
If MsgBox("Notification has already been sent. Do you wish to re-send?", vbYesNo, "Send Notification?") = vbYes Then
DoCmd.RunMacro "SendMail"
Else
DoCmd.Close
End If
Else
DoCmd.RunMacro "SendMail"
DoCmd.Close
End If
End Sub
Here is the problem. Right now the MACRO sends a PDF copy of the form that contains the button that executes the above code, which is what I want. However I need to be able to choose the receipient.
So if form "A" is open and that is the form I need to send as a PDF, I need to be able to choose a email receipient.
As it stands the MACROS contain the FORM NAME the RECEIPIENT. There is no real way to make the MACRO conditionally editable, SO.......................
<!--sizeo:4--><!--/sizeo-->So, what I am looking to do is this:<!--sizec--><!--/sizec-->
1. Place a button on all the forms that I want to email.
2. When clicked a form will open that acts as an address book / directory
3. When a button next to the desired receipient is clicked, outlook opens to the send screen addressed to the receipient chosen from the directory and attaches the form in step #1 as a PDF
4. User can now select "SEND" and off the message goes.
I have ZERO idea how to do something like this. I sure could use some help.
Thanks,
Loren
My Engineering Request database needs an email feature
I have a seperate MACRO for each departments email address.
DEPARTMENT----------------ASSOCIATED EMAIL ADDRESS
Production -------- ------QAProduction@blah.blah
Engineering-------- ------QAEngineering@blah.blah
Materials---------- -------QAMaterials@blah.blah
Quality Assurance--- ----Quality Department@blah.blah
You get the idea
This is typical code for executing the email macro:
Private Sub Command23_Click()
If Me.Email = "Sent" Then
If MsgBox("Notification has already been sent. Do you wish to re-send?", vbYesNo, "Send Notification?") = vbYes Then
DoCmd.RunMacro "SendMail"
Else
DoCmd.Close
End If
Else
DoCmd.RunMacro "SendMail"
DoCmd.Close
End If
End Sub
Here is the problem. Right now the MACRO sends a PDF copy of the form that contains the button that executes the above code, which is what I want. However I need to be able to choose the receipient.
So if form "A" is open and that is the form I need to send as a PDF, I need to be able to choose a email receipient.
As it stands the MACROS contain the FORM NAME the RECEIPIENT. There is no real way to make the MACRO conditionally editable, SO.......................
<!--sizeo:4--><!--/sizeo-->So, what I am looking to do is this:<!--sizec--><!--/sizec-->
1. Place a button on all the forms that I want to email.
2. When clicked a form will open that acts as an address book / directory
3. When a button next to the desired receipient is clicked, outlook opens to the send screen addressed to the receipient chosen from the directory and attaches the form in step #1 as a PDF
4. User can now select "SEND" and off the message goes.
I have ZERO idea how to do something like this. I sure could use some help.
Thanks,
Loren