Change the account from sending e-mail

Status
Not open for further replies.
M

Michael

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
 
C

Carim

On Nov 22, 1:51 pm, Michael <Mich...> 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
 
M

Michael

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("xxxx@gmail.com")

objRecip.Type = olBCC

objRecip.Resolve

Set objRecip = Nothing

End Sub

Thank you!

Michael
 
J

JP

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...> 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.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
E Change sending account depending on Subjectline Outlook VBA and Custom Forms 0
D Change Microsoft Account password - what to do to update on all devices Using Outlook 4
S Example VBA Macro - To Conditionally Change the From Account and Add a BCC Address on Emails Outlook VBA and Custom Forms 11
J Change POP account to Forwarder - What happens in Outlook? Using Outlook 2
H Change Default Email Account Using VBA Outlook VBA and Custom Forms 5
Davzell Change default pop3 account with script, prf or registery ? Outlook VBA and Custom Forms 0
M Change default "automatically test account settings when Next is clicked" Using Outlook 1
Diane Poremsky Change the Social Connector Account Using Outlook 0
Fozzie Bear Change the Display Name recipients see for Exchange account Exchange Server Administration 0
G Outlook2013 - "From" name doesn't change even when changed in Account Setting Using Outlook 4
G Default Account Change Using Outlook 5
O Exchange + pst: Can I change the default Outlook calendar/tasks/account? Exchange Server Administration 2
J Change Email Account Outlook VBA and Custom Forms 5
D How to change account used for replies from default Outlook VBA and Custom Forms 7
S how to add my custom items to "Change E-mail Account" dialog Outlook VBA and Custom Forms 1
P SendUsingAccount to change from account Outlook VBA and Custom Forms 4
P Outlook SendUsingAccount to change from account Outlook VBA and Custom Forms 5
S Change "This Week" flag start date behavior Using Outlook 1
N Help creating a VBA macro with conditional formatting to change the font color of all external emails to red Outlook VBA and Custom Forms 5
S Outlook 2016 Change how Outlook shows me contacts in emails Using Outlook 0
witzker HowTo Change message Class of contact form Outlook VBA and Custom Forms 0
Z Outlook 365 delete reminder you can’t make change to contents of this-read only folder Using Outlook 4
witzker Pls help to change the code for inserting date in Ol contact body Outlook VBA and Custom Forms 5
R How to Change Margins In Google Docs...? Using Outlook 0
e_a_g_l_e_p_i Outlook 2010 How can I change the font size on right side appointment pane Using Outlook 12
diver864 vba for a rule to automatically accept meeting requests with 'vacation' in subject, change to all-day event, change to free, don't send reply Outlook VBA and Custom Forms 1
B Change Font and Font size using VBA Outlook VBA and Custom Forms 9
D Change senders title Using Outlook 1
W Recurrence: delete older occurrences / change earliest start time Outlook VBA and Custom Forms 0
J Outlook 2013 Change color of text in data fields of contacts in Outlook 2013? Using Outlook 10
B Change row background color of selected item Using Outlook 1
PGSystemTester VBA To Change AppointmentItem.BusyStatus From MeetingItem Before Send Using Outlook 0
B Change from Address Outlook VBA and Custom Forms 0
X If you change expiration date of repeated task it dupplicates Using Outlook 1
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
B See "Change View" Drop Down as a List? Using Outlook 1
V Change start time based on message duration Outlook VBA and Custom Forms 2
R Folder pane width change Using Outlook 69
S Change VBA script to send HTML email instead of text Outlook VBA and Custom Forms 3
S Outlook 2010 unable to change default font Using Outlook 7
P How can I change my calendar view back Using Outlook 3
A Edit subject - and change conversationTopic - using VBA and redemption Outlook VBA and Custom Forms 2
T Change the selected Message in the Outlook window Outlook VBA and Custom Forms 2
geofferyh How to change the Attachment File Name? Outlook VBA and Custom Forms 1
W Appointment occurrences change the location property Using Outlook 0
T Scheduled footer change Using Outlook 2
B Change font of reminder of an email header Outlook VBA and Custom Forms 3
CWM030 Name Change? Exchange Server Administration 9
V not able to change name in customize Ribbon Outlook VBA and Custom Forms 1
JoeG Appointment Delete/Change Recurrence Outlook VBA and Custom Forms 0

Similar threads

Top