Link to home
Start Free TrialLog in
Avatar of spar-kle
spar-kleFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How can I use VBA in Excel to select a shared email account for sending an email?

A shared email account has been setup on our Exchange 2013 server.
i have authorisation to send email from this account.

i can't seem to send an email from this account/email address using vba.

i have tried .sentonbehalfof = "account"

any ideas please?

Thanks
Avatar of spar-kle
spar-kle
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I'm using Excel & Outlook 2010
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your reply, really appreciated.

I also often refer to Ron de Bruin's site for emailing from Excel and had checked his site out for this requirement.

Unfortunately the suggestions don't seem to work.
I get a number of the account returned for the main user account, but not for the shared account, so can't select this. That's why I thought I would try .sentonbehalfof

Any other ideas please?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks

Adding the email account does mean that rondebruin code works, however emails just sit in the outbox of that email account then.
it seems to upset the Exchange settings....??
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes I think you're right.

I can send emails from the Shared email account, albeit the emails end up in the primary email "Sent Items" folder

Thanks for your help
Thanks for your help, you've been a great help!