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

Outlook 2007: SendUsingAccount - update infobar



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 21st 08, 02:24 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 4
Default Outlook 2007: SendUsingAccount - update infobar

Hello,

I´m using the SendUsingAccount-Funktion to set the mail-Account I´d
like to use for sending a new message. This works fine. The selected
account can be seen from the check when clicking on the "Account"-
Button (Below "Send")
My Problem:
The gray info-bar between the ribbonbar and the send-button. Normally
there is text like "you replied" or "the message has not yet been
sent" shown.

1) Sometimes this gray-info bar is shown, sometimes not. This depends
on composing a new Mail or replying to an old one. I always want to
have this info-bar. Is there a vba-command (or another way) to show it
always?

2) If this Info-bar is visible it says "The message will be sent using
Account xxx". When changing this account with the SendUsingAccount-
function the info-bar is not updated although the message is sent via
the choosen account. Is there a possibility to update/redraw the info-
bar?

Thanks,
Mark
Ads
  #2  
Old July 21st 08, 03:56 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook 2007: SendUsingAccount - update infobar

1) No, Outlook controls the visibility of the infobar and does not expose its
visibility or content to developers.

2) I cannot reproduce your problem. If the infobar is visible and I change
the value of SendUsingAccount, the infobar refreshes about a heartbeat later
to show the new account.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



" wrote:

Hello,

I´m using the SendUsingAccount-Funktion to set the mail-Account I´d
like to use for sending a new message. This works fine. The selected
account can be seen from the check when clicking on the "Account"-
Button (Below "Send")
My Problem:
The gray info-bar between the ribbonbar and the send-button. Normally
there is text like "you replied" or "the message has not yet been
sent" shown.

1) Sometimes this gray-info bar is shown, sometimes not. This depends
on composing a new Mail or replying to an old one. I always want to
have this info-bar. Is there a vba-command (or another way) to show it
always?

2) If this Info-bar is visible it says "The message will be sent using
Account xxx". When changing this account with the SendUsingAccount-
function the info-bar is not updated although the message is sent via
the choosen account. Is there a possibility to update/redraw the info-
bar?

Thanks,
Mark

  #3  
Old July 21st 08, 04:35 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 4
Default Outlook 2007: SendUsingAccount - update infobar

On 21 Jul., 15:56, Sue Mosher [MVP-Outlook]
wrote:
1) No, Outlook controls the visibility of the infobar and does not expose its
visibility or content to developers.


Ok.

2) I cannot reproduce your problem. If the infobar is visible and I change
the value of SendUsingAccount, the infobar refreshes about a heartbeat later
to show the new account.


This is what I do:

Private Sub Application_Startup()
Set myInspector = Application.Inspectors
End Sub

Create New Mail

Make infobar visible by "selecting" the already selected account
number 1

run Testfunction manually:
Private Sub Test()
Application.ActiveInspector.CurrentItem.SendUsingA ccount =
Application.Session.Accounts.Item(2)
End Sub

Result: info bar shows Account 1, Account-Button shows Account 2
(which is also used when sending)

What am I doing wrong?

Mark
  #4  
Old July 21st 08, 04:57 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 4
Default Outlook 2007: SendUsingAccount - update infobar

On 21 Jul., 15:56, Sue Mosher [MVP-Outlook]
wrote:
1) No, Outlook controls the visibility of the infobar and does not expose its
visibility or content to developers.


Ok.

2) I cannot reproduce your problem. If the infobar is visible and I change
the value of SendUsingAccount, the infobar refreshes about a heartbeat later
to show the new account.


I´m doing the following:

Private Sub Application_Startup()
Set myInspector = Application.Inspectors
End Sub

Create a new Mail

Make the info-bar visible by selcting the already selected Acoount 1

manually call:
Private Sub Test()
Application.ActiveInspector.CurrentItem.SendUsingA ccount =
Application.Session.Accounts.Item(2)
End Sub

The text in the infobar does not change. But the account 2 is selected
and used

What am I doing wrong?

Mark
  #5  
Old July 21st 08, 06:22 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook 2007: SendUsingAccount - update infobar

OK, I see the same behavior if I follow your steps. My code was making the
change when the NewInspector event fires. You might see if that works better
for you . If not, I don't know how to make Outlook do what you want.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



" wrote:

On 21 Jul., 15:56, Sue Mosher [MVP-Outlook]
wrote:
1) No, Outlook controls the visibility of the infobar and does not expose its
visibility or content to developers.


Ok.

2) I cannot reproduce your problem. If the infobar is visible and I change
the value of SendUsingAccount, the infobar refreshes about a heartbeat later
to show the new account.


This is what I do:

Private Sub Application_Startup()
Set myInspector = Application.Inspectors
End Sub

Create New Mail

Make infobar visible by "selecting" the already selected account
number 1

run Testfunction manually:
Private Sub Test()
Application.ActiveInspector.CurrentItem.SendUsingA ccount =
Application.Session.Accounts.Item(2)
End Sub

Result: info bar shows Account 1, Account-Button shows Account 2
(which is also used when sending)

What am I doing wrong?

Mark

  #6  
Old July 22nd 08, 09:51 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 4
Default Outlook 2007: SendUsingAccount - update infobar

On 21 Jul., 18:22, Sue Mosher [MVP-Outlook]
wrote:
OK, I see the same behavior if I follow your steps. My code was making the
change when the NewInspector event fires.


Can´t reproduce this.

You might see if that works better for you.


I hope so.
I want to change the sending account automaticly when opening a
compose-new-mail-window depending on
- compose new mail -- account 3
- reply, reply all, forward -- depends on recipient of parant message
(I have different E-Mail-Alias).

You can find my source below. Do you have another suggestion which
includes changing the infobar?

Regards,
Mark


Public WithEvents myInspector As Outlook.Inspectors
Public WithEvents newMailItem As MailItem

Private Sub Application_Startup()
Set myInspector = Application.Inspectors
End Sub

Private Sub myInspector_NewInspector(ByVal Inspector As Inspector)
If Inspector.CurrentItem.Class = olMail Then
Set newMailItem = Inspector.CurrentItem
End If
End Sub

Private Sub newMailItem_Open(Cancel As Boolean)
If newMailItem.CreationTime = "01.01.4501" Then
'A new MailElement is created
If newMailItem.ConversationIndex "" Then
'Reply oder forward
'##find parent message-recipient and set correct
account_number here##
newMailItem.SendUsingAccount =
Application.Session.Accounts.Item(account_number)
Else
'new Mail
newMailItem.SendUsingAccount =
Application.Session.Accounts.Item(3)
End If
Else
'An existing MailElement is opened in read-modus
'Do nothing
End If
End Sub
  #7  
Old July 22nd 08, 02:39 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook 2007: SendUsingAccount - update infobar

This expression -- newMailItem.CreationTime = "01.01.4501" -- will always
return False, because CreationTime is a date/time property, not a string
property. Better to use newMailItem.Size, which will equal 0 for a new item.

As I've said before, the behavior of the infobar is not directly
controllable.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



" wrote:

On 21 Jul., 18:22, Sue Mosher [MVP-Outlook]
wrote:
OK, I see the same behavior if I follow your steps. My code was making the
change when the NewInspector event fires.


Can´t reproduce this.

You might see if that works better for you.


I hope so.
I want to change the sending account automaticly when opening a
compose-new-mail-window depending on
- compose new mail -- account 3
- reply, reply all, forward -- depends on recipient of parant message
(I have different E-Mail-Alias).

You can find my source below. Do you have another suggestion which
includes changing the infobar?

Regards,
Mark


Public WithEvents myInspector As Outlook.Inspectors
Public WithEvents newMailItem As MailItem

Private Sub Application_Startup()
Set myInspector = Application.Inspectors
End Sub

Private Sub myInspector_NewInspector(ByVal Inspector As Inspector)
If Inspector.CurrentItem.Class = olMail Then
Set newMailItem = Inspector.CurrentItem
End If
End Sub

Private Sub newMailItem_Open(Cancel As Boolean)
If newMailItem.CreationTime = "01.01.4501" Then
'A new MailElement is created
If newMailItem.ConversationIndex "" Then
'Reply oder forward
'##find parent message-recipient and set correct
account_number here##
newMailItem.SendUsingAccount =
Application.Session.Accounts.Item(account_number)
Else
'new Mail
newMailItem.SendUsingAccount =
Application.Session.Accounts.Item(3)
End If
Else
'An existing MailElement is opened in read-modus
'Do nothing
End If
End Sub

 




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
Outlook 2007 Won't Update RSS Feeds patetc Outlook - General Queries 1 January 12th 08 04:52 PM
No Infobar issue Cliff Wang[_2_] Outlook - General Queries 3 August 2nd 07 07:18 PM
.sendusingaccount ? for OL 2007 Bruce Outlook and VBA 12 June 5th 07 07:09 AM
InfoBar question Tom Felts Outlook - General Queries 0 August 10th 06 12:54 AM
Update broke my Outlook 2007 Sam Steinhauser Outlook - General Queries 15 July 24th 06 03:59 AM


All times are GMT +1. The time now is 09:08 PM.


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.