The list of email addresses is getting quite long and I want to automate clicking the SEND button in Outlook from the VBA script...but don't know how!
Here is the VB code currently that works perfectly as long as I manually click the SEND button in Outlook for each email:
Expand|Select|Wrap|Line Numbers
- Dim counter As Integer
- Dim origemailstosend As Integer
- counter = 1
- origemailstosend = Me![totalemails]
- While counter <= origemailstosend
- DoCmd.SendObject _
- , _
- , _
- , _
- [eMailclean], _
- , _
- "subscriptions@ourcompany.org", _
- "Thank you for your purchase!", _
- "Thank you for your purchase of the Money Matters handout and bible study series." & Chr(13) & Chr(13) & "Your Username is: " & [Acct_Number] & Chr(13) & "Your Password is: " & [ZipCode] & Chr(13) & Chr(13) & "Please go to www.ourcompany.org and click on the Stewardship Download Center to download your Money Matters files." & Chr(13) & Chr(13) & "Sincerely," & Chr(13) & Chr(13) & "Customer Service" & Chr(13) & "our company", _
- True
- Me![totalemails] = Me![totalemails] - 1
- Requery
- counter = counter + 1
- Wend
- DoCmd.Close
Thanks for any help.