use a specific email account

  • Thread starter Thread starter G L
  • Start date Start date
G

G L

Hello!
I am sending email through vb in access using an outlook mail item
object. I would like to use a specific email account for this email (the
user has many accounts and the one needed is not the default account and
can not be altered). How can I do this in vb?

Thanks!
 
A POP account. I am using an Outlook mailitem object to send the message
and it must be sent by a specific POP account in Outlook.

Thanks,
GL
 
Did you have a question? The newsgroup interface you are using apparently
does not quote earlier messages in the thread, making your latest message so
short on detail that we don't know what that question might be. Please take
the time to quote the original message. Be sure to include your Outlook
version.
 
Hello!
I am sending email through vb in access using an outlook mail item
object. I would like to use a specific POP account, that is in the
user's Outlook 2003, for this email (the
user has many accounts and the one needed is not the default account and
we are not allowed to alter it).
How can I do this in vb?

Thanks!
 
Thanks for the reply. Besides using the command bar technique do you
think it would be appropriate to "kill" Outlook (2003) and then open it
again using a new mapi session logon to a different profile that only
contains the POP account the user needs?

Thanks again!
-----------------------------------------------------------
You would need to use CommandBars techniques to programmatically "click"
the
appropriate menu command to change the account. See
http://www.outlookcode.com/d/tips/commandbarfun.htm

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
It should be possible, but it could take several minutes to shut down the
current Outlook session and then restart Outlook with a different profile.
If you have the SMTP server details, you might consider using CDO for
Windows instead of Outlook objects. That would also let you write the code
in Access while avoiding security prompts.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top