use a specific email account

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!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
R

Rak

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
S

Sue Mosher [MVP-Outlook]

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.
 
R

Rak

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!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
R

Rak

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



Rak said:
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!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
S

Sue Mosher [MVP-Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top