Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Outlook Status Bar

589 views
Skip to first unread message

Mike Hollibaugh

unread,
Jan 9, 2003, 11:12:26 AM1/9/03
to

Does anyone know how to write to the Outlook Status Bar
at the bottom of the screen useing VBA?

Eric Legault

unread,
Jan 10, 2003, 2:29:57 PM1/10/03
to
Nope, can't be done, unless there's some far out Win32API calls that do
this, but I doubt it. Access support this feature; MS should have put it in
Outlook too.

--
Eric Legault, MCSD
ADAPSYS - http://www.adapsys.ca


"Mike Hollibaugh" <mho...@buehner-fry.com> wrote in message
news:29a701c2b7f9$e69db4b0$8af82ecf@TK2MSFTNGXA03...

Sue Mosher [MVP]

unread,
Jan 10, 2003, 2:41:38 PM1/10/03
to

Send those suggestions to msw...@microsoft.com. <g>
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm


"Eric Legault" <ericatwor...@shaw.ca> wrote in message news:#EWFq8NuCHA.640@TK2MSFTNGP12...

Michael Cooper

unread,
Feb 20, 2003, 11:51:12 PM2/20/03
to

As far as I can tell, you can't get to the status bar short of funky
Win32API calls. However, if your goal is to provide status or progress
information for a user running one of your macros there IS a workable
kludge: create a CommandBar object, docked to the bottom of the screen,
with one or more CommandBarControl objects with captions and/or icons
that display the required information.

This worked (at work) in Office 2000, and Office XP. Can't vouch for
earlier versions of Office. Should also work for other Office apps,
although the only one I've actually tested it in is Word. I use it
to display progress info in another macro that saves all the emails in
my inbox to files. I use characters to convey completion percentages:
"[===+++++++++++++++++] Saving Message 300/2000, 15% Complete"
"[====================] Saving Message 2000/2000, 100% Complete"

You really don't need all these subroutines and global variables. You
can initialize the statusbar in the first macro the user calls, and
then just look it up by name in the CommandBars collection by name,
then look up the control whose caption you want to change by name in
its Controls collection. Example:
CommandBars("myprogressbar").Controls(1).Caption="44% Complete..."

I'll leave all that as an exercise for the programmer. And before you
complain, remember that I DID say it was a kludge.
-Michael Cooper
notmyaddrt...@yahoo.com
(remove the first nine characters to get my email address)

-------------------CUT HERE-------------------------------------------
'Global Declaration of the status display:
Dim myCommandBar As CommandBar, myCommandBarControl As CommandBarControl

'A Subroutine to initialize the status bar:
Sub InitStatus(StatusBarName As String, InitialCaption As String)
'Clean up in case a macro bombed:
RemoveStatus StatusBarName

'Instantiate and initialize the objects:
Set myCommandBar = CommandBars.Add(StatusBarName,msoBarBottom,,True)
'Alternatively, use msoBarFloating to float the bar over the window
Set myCommandBarControl = myCommandBar.Controls.Add(msoControlButton,,,,True)
'For some bizarre reason, msoControlPopup might actually work better-
'On some machines, the msoControlButton won't display a caption.
myCommandBarControl.Caption = InitialCaption
myCommandBarControl.Visible = True
myCommandBar.Visible = True
End Sub

'Subroutine to get rid of the status bar:
Sub RemoveStatus(StatusBarName As String)
'Multiple CommandBars can share the same name, so get rid of previous
For i = CommandBars.Count To 1 Step -1
If CommandBars(i).Name = StatusBarName Then
CommandBars(i).Delete
End If
Next i
End Sub

'Subroutine to set the status bar caption:
Sub SetStatus(inCaption As String)
myCommandBarControl.Caption = inCaption
End Sub


'Some macros that can be called to
Sub showexample()
InitStatus "my progress bar", "this is my progressbar"
End Sub
Sub showexample2()
SetStatus "my new status is..."
End Sub
Sub cleanupexample()
RemoveStatus "my progress bar"
End Sub

-------------------CUT HERE-------------------------------------------

On Fri, 10 Jan 2003 13:29:57 -0600, "Eric Legault" <ericatwor...@shaw.ca>
wrote:

Eric Legault

unread,
Feb 25, 2003, 2:25:54 PM2/25/03
to
That's a wicked cool idea! I'm going to have to find a use for that some
day...

--
Eric Legault, MCSD
ADAPSYS - http://www.adapsys.ca


"Michael Cooper" <notmyaddrt...@yahoo.com> wrote in message
news:h5cb5v8nimkpfpob5...@4ax.com...

0 new messages