Mattyman
asked on
MS Access and outlook profile name
I'm using ms access to send emails and files. I'm using outlook to do this but i also need to change the profile before i send the email. I use the code below but outlook opens before the profile is changed.
I would also like not have the GUI opening and the the whole thing run in the back ground
Help?
I would also like not have the GUI opening and the the whole thing run in the back ground
Help?
Public Function SendEMail(too As String, subject As String, Optional body As String, Optional cc As String, Optional attachment As String, Optional account As String)
Dim MyOutlook As Outlook.Application
Dim OutlookNamespace As Outlook.NameSpace
Dim MyMail As Outlook.MailItem
Set OutlookNamespace = MyOutlook.GetNamespace("mapi")
Set MyOutlook = Outlook.Application
Set OutlookNamespace = MyOutlook.GetNamespace("mapi")
OutlookNamespace.Logon "arconi"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER