Saphirah
Active member
- Local time
- Today, 15:10
- Joined
- Apr 5, 2020
- Messages
- 163
Hello everyone,
i am trying to automate sending an email from Access to Outlook.
For that i created the following code:
Now i want to add a signature at the end of the mail and then send the email. The signature can be added using .display
With the unintended side effect that the email is opened, and immediately closed. This not only looks annoying, it also takes much longer than just generating and sending the emails.
I want to send these Emails in the background, as i am batching quite a lot of emails and the user should not sit in front of a flashing screen for a minute or so.
There are a lot of code examples online regarding this, but every single one uses .display.
So is there a way to add a signature without displaying the email?
Thank you very much for your help.
i am trying to automate sending an email from Access to Outlook.
For that i created the following code:
Code:
Sub SendMail()
Dim OlApp As Outlook.Application
Dim ObjMail As Outlook.MailItem
Set OlApp = Outlook.Application
Set oMail= OlApp.CreateItem(olMailItem)
oMail.BodyFormat = olFormatHTML
oMail.Subject = "Subject goes here"
oMail.Recipients.Add "Email goes here"
oMail.HTMLBody = "HTML goes here " & oMail.HTMLBody
End Sub
Now i want to add a signature at the end of the mail and then send the email. The signature can be added using .display
Objective-C:
Sub SendMail()
Dim OlApp As Outlook.Application
Dim ObjMail As Outlook.MailItem
Set OlApp = Outlook.Application
Set oMail= OlApp.CreateItem(olMailItem)
oMail.BodyFormat = olFormatHTML
oMail.Subject = "Subject goes here"
oMail.Recipients.Add "Email goes here"
oMail.Display
oMail.HTMLBody = "HTML goes here " & oMail.HTMLBody
oMail.Send
End Sub
With the unintended side effect that the email is opened, and immediately closed. This not only looks annoying, it also takes much longer than just generating and sending the emails.
I want to send these Emails in the background, as i am batching quite a lot of emails and the user should not sit in front of a flashing screen for a minute or so.
There are a lot of code examples online regarding this, but every single one uses .display.
So is there a way to add a signature without displaying the email?
Thank you very much for your help.