Adding a CommandBar to an Outlook 97 inspector

  • Thread starter Thread starter Nik The Greek
  • Start date Start date
N

Nik The Greek

Is it possible to add a new commandbar to an inspector _in Oultook
97_? I'm tyring it in VB and Delphi and getting "error 800040005",
which is 'access denied' IIRC, when I call "CommandBars.Add".
 
It works just fine for me. What is your code and when is it called? Note
that in Outlook 97/98 you can create new toolbars and /or buttons, but you
cannot sink click events from them. That functionality was not implemented
until Outlook 2000.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Thanks for your help.
I'm trying it in VB, simply by calling:
oapp.ActiveInspector.CommandBars.Add
with all sort of parameter values, I think I tried every combination.
I'm doing this from VB after I manually open an inspector on my
Outlook 97, but I've also tried it in Delphi.
I always get 80040005. Are you 100% sure that it's possible to add new
toolbars to _Inspectors_, not Explorers...? Can you give me a VB line
that you know is supposed to work, like:

olApp.ActiveInspector.CommandBars.Add("test", ?, ?, ?)

That would be great.
And btw, if I can't sink events from the toolbar, what would you
suggest I do? Hooking the mouse click messages of Outlook's GUI thread
comes to mind as a workaround, but that's pretty nasty.

Thanks again.
 
Oh, sorry, I didn't realize you do it for an inspector, not an explorer.
Inspector never worked for me either, but explorers do work fine -
OutlookSpy (url in my sig.) adds a toolbar to an explorer in all version of
Outlook using OOM.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top