Hans & Company:
I've been working sixteen hour days for the past four days trying to get
this remedied and my diet from dinner to sleep has been coffee and nicotine
so kindly do not accept this as gospel, but here goes:
I believe I have this issue (debugging in VB) resolved.
What appears to have fixed it is downloading and installing Office 2000
Service Release 1a (SR-1a).
In my case, I could watch objOutlookApplication and "browse" the
ActiveExplorer.CommandBars property, but if I tried to watch
objOutlookApplication.ActiveExplorer.CommandBars, I'd get Interface not
Registered or Method 'item' of _commandbars failed....
This indicated that it was Office that was somehow corrupted, since in the
former case CommandBars was a member of an Outlook Object/Class whereas
objOutlookApplication.ActiveExplorer.CommandBars is an Office Object/Class.
I'm just a Business School graduate who decided to code one day so I know
not the internals but I figured corruption of Office DLLs ==or=== corruption
of Office 2000's registry entries was the culprit.
At any rate, installing SR-1a appears to have fixed it.
You can find it here:
http://www.microsoft.com/downloads/d...DisplayLang=en
Of course I cannot warranty this solution and I have not fully tested here
but Hans from your email I know you are "in a coma" with respect to getting
this done so i toss this "out there".
You will need your Office 2000 CDs.
Best of luck,
John
"Hans Börjesson" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi Ken!
>
> I have tested with this earlier (and I tried it now once again) and I get
> exception anyway "Method 'item' of _commandbars failed. If I debug the
> m_objExpl.CommandBars.Count it seems to show the right number of elements.
> If I did not call my function to delete my toolbar (which I actually think
I
> don't have to call since I use the temporary=true when I create the
toolbar)
> it fails when I try do add my commandbar with error Interface not
> registered.
>
> There must be something corrupt with my registry but I don't understan why
> it works when I run the dll and not when I run via VB.
>
> Set oCommandBar = m_objExpl.CommandBars.Add("VendimoToolbar", , , True)
> oCommandBar.Visible = True
> oCommandBar.Enabled = True
> oCommandBar.Position = msoBarTop
>
> Set oCmdExplorerBtn = oCommandBar.Controls.Add(msoControlButton, , , ,
> True)
> oCmdExplorerBtn.Caption = g_xml.WriteTextValue("msg_028")
> oCmdExplorerBtn.Enabled = True
> oCmdExplorerBtn.Visible = True
> oCmdExplorerBtn.Tag = GetNewGuid
> m_btoolbarsAdded = True
>
>
> Regards
> /Hans
>
>