mgmercurio
Member
- Local time
- Today, 15:55
- Joined
- Jan 18, 2021
- Messages
- 55
Vlad, you said earlier for me to put your Outlook Automaton Function in a module and then just replace my Docmd.sendobject with a call to your function...I put the following code in my email button and it is returning a compile error "Argument Not Optional"
Private Sub bt_SendEmail_Click()
Dim strEmail As String
Dim var As Variant
With Me.EmailListBx1
For Each var In .ItemsSelected
strEmail = strEmail & .ItemData(var) & ";"
Next
Call vcSendEmail_Outlook_With_Attachment
End With
(commented out) 'MsgBox strEmail
(commented out) 'DoCmd.SendObject acSendNoObject, , , strEmail, , , "This is a test message subject", "This is the body of my email message. Hello World.", True
End Sub
Private Sub bt_SendEmail_Click()
Dim strEmail As String
Dim var As Variant
With Me.EmailListBx1
For Each var In .ItemsSelected
strEmail = strEmail & .ItemData(var) & ";"
Next
Call vcSendEmail_Outlook_With_Attachment
End With
(commented out) 'MsgBox strEmail
(commented out) 'DoCmd.SendObject acSendNoObject, , , strEmail, , , "This is a test message subject", "This is the body of my email message. Hello World.", True
End Sub