PC Review


Reply
Thread Tools Rate Thread

Change the account from sending e-mail

 
 
Michael
Guest
Posts: n/a
 
      22nd Nov 2009
Hello,

I have followed problem (Outlook 2007):

I want to change the Account where I send my e-mail.
I have this code:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

....
ActiveInspector.CommandBars.FindControl(, 31224)

.... but where can I now change the value in the listbox from entry 2 to 1?

Thank you!
Michael

 
Reply With Quote
 
 
 
 
Carim
Guest
Posts: n/a
 
      22nd Nov 2009
On Nov 22, 1:51*pm, Michael <Mich...@discussions.microsoft.com> wrote:
> Hello,
>
> I have followed problem (Outlook 2007):
>
> I want to change the Account where I send my e-mail.
> I have this code:
>
> Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
>
> ...
> ActiveInspector.CommandBars.FindControl(, 31224)
>
> ... but where can I now change the value in the listbox from entry 2 to 1?
>
> Thank you!
> * *Michael


Hi,

Take a look at Ron's solution ...
http://www.rondebruin.nl/mail/account.htm

HTH
 
Reply With Quote
 
Michael
Guest
Posts: n/a
 
      24th Nov 2009
Hello,

> Take a look at Ron's solution ...
> http://www.rondebruin.nl/mail/account.htm


Thank you!

I have include the code in my solution and der sender-account is changing.
Unfortunately the mail is get stuck in the Outgoing-Folder.
I must reopen the mail and must once again click of the send button.
Then I must also again sign the mail. Then the mail will be sending.

The code is:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim objRecip As Recipient

Item.SendUsingAccount = Outlook.Application.Session.Accounts.Item(1)

Set objRecip = Item.Recipients.Add("(E-Mail Removed)")
objRecip.Type = olBCC
objRecip.Resolve

Set objRecip = Nothing

End Sub

Thank you!
Michael
 
Reply With Quote
 
JP
Guest
Posts: n/a
 
      24th Nov 2009
You have to set that property before the message is sent. If you use
the code from Ron's site and create your message programmatically, it
should send normally.

--JP

On Nov 24, 3:51*am, Michael <Mich...@discussions.microsoft.com> wrote:
> Hello,
>
> > Take a look at Ron's solution ...
> >http://www.rondebruin.nl/mail/account.htm

>
> Thank you!
>
> I have include the code in my solution and der sender-account is changing..
> Unfortunately the mail is get stuck in the Outgoing-Folder.
> I must reopen the mail and must once again click of the send button.
> Then I must also again sign the mail. Then the mail will be sending.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chosing an e-mail account when sending a marketing e-mail campaign MercerBarnes Microsoft Outlook BCM 0 3rd Sep 2009 02:40 AM
Cannot change an account while sending e-mail =?Utf-8?B?RXJleg==?= Microsoft Outlook Installation 1 4th Aug 2004 04:30 AM
Outlook 2000 CW sending mail using either Corp. or Internet E-mail account Peter Microsoft Outlook 0 5th Apr 2004 04:10 PM
How to change the sending account Wolf Remove-YourHat Microsoft Outlook VBA Programming 2 7th Feb 2004 05:59 PM
sending from a different mail account Jeff Wogan Microsoft Outlook Discussion 1 31st Jul 2003 02:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:35 PM.