A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Change the account from sending e-mail



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 24th 09, 08:51 AM posted to microsoft.public.outlook.program_vba
Michael
external usenet poster
 
Posts: 165
Default Change the account from sending e-mail

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 = ")
objRecip.Type = olBCC
objRecip.Resolve

Set objRecip = Nothing

End Sub

Thank you!
Michael
  #2  
Old November 24th 09, 02:00 PM posted to microsoft.public.outlook.program_vba
JP[_3_]
external usenet poster
 
Posts: 201
Default Change the account from sending e-mail

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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I change the email account when sending Invitations to Appointments? Marts Outlook - General Queries 0 July 26th 09 06:03 AM
Change signatures based on which account you're sending from? FISH Outlook - General Queries 1 December 5th 08 05:09 AM
Outlook Script Sending Mail using another account ? bbnimda Outlook - Using Forms 4 November 10th 08 06:34 PM
select e-mail account for sending message BBran Outlook - General Queries 12 August 3rd 07 04:42 PM
how to automate specifying the account to use when sending mail? admaybhate Outlook - General Queries 3 September 18th 06 11:49 AM


All times are GMT +1. The time now is 06:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.