Sending Email From Shared Mailbox (1 Viewer)

LB79

Registered User.
Local time
Today, 15:33
Joined
Oct 26, 2007
Messages
505
Hi All,

Im having a hard time finding a decent example on Google so hoped someone could point me to one, or let me know how...

I use Access/Outlook to send automated emails a lot but now Ive been asked to set it up so that all emails are sent from a shared account.
MSDN seem to have an example for a shared calandar but I cant seem to change it for what I need.

The shared account doesn't appear in Outlook in my Tools>Account Settings list (I dont have it as an account but as a shared mailbox).

Thanks for any advice.
 
Last edited:

LB79

Registered User.
Local time
Today, 15:33
Joined
Oct 26, 2007
Messages
505
Worked it out for myself in the end

Code:
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
On Error Resume Next
With OutMail
.To = "[EMAIL="Me@MyEmail.com"]Me@MyEmail.com[/EMAIL]"
.CC = ""
.Bcc = ""
.Subject = "This is a test"
.Bod = "Test"
.SentOnBehalfOfName = "[EMAIL="Me@MyOtherEmail.com"]Me@MyOtherEmail.com[/EMAIL]"
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
 

Users who are viewing this thread

Top Bottom