send email thru VB

J

Jean-Claude

Hello,
I have a VB Script (but if you have the solution for VBA, I think I can
adapte it) and trying to send a mail with Outlook 2003 (first default
account in POP3, secondary account (shared at the office) Exchange)
from the script :

Set objMAIL = CreateObject("outlook.application")
Set mail = objMAIL.CreateItem(0)
mail.To = "..."
mail.Subject = "..."
mail.Body = "..."
mail.Display

Ok, it's fine, the mail is displayed, I can send it.
But, how can I change the account used to send it, not to keep the default ?
(manually no problem of course, but in the script...)
Something like : mail.Sender = (e-mail address removed) ?
I could use CDO to do it, but I prefer to use the Outlook object in my case.

I didn't found in internet. Any ideas ? Thanks.
Jean-Claude
 

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