SendUsingAccount not working - code not finding Mailbox Accounts
Posted on 2011-03-15
Hi, I've attempted to use the code from rondrebruin.nl to send emails through outlook using a mail account other then my default account. When I use my default account, the code works fine - email is sent. But when I change it to refelct my other mail account, I get no errors, but the email is still sent using my default account. In an attempt to figure out if the code was even seeing the other mail accounts I also have access to (3), I used the below code. It returns 1 - which is only my default account
Dim OutApp As Outlook.Application
Dim I As Long
Set OutApp = CreateObject("Outlook.Application")
For I = 1 To OutApp.Session.Accounts.Count
MsgBox OutApp.Session.Accounts.Item(I) & " : This is account number " & I
I've tried a few different email codes, all work fine when I use my default email account.
I am at my wits end trying to figure out why the code does not recognize the Mail accounts. I am able to manually send emails with no issues so I don't think it is an access issue. Can you please help me figure out what the possible issue may be? I don't even know what to ask my help desk so I can figure out if the issue is the way the account is set up. Please advise.